主页

索引

模块索引

搜索页面

3.1.4. [主]文件使用实例 [1]

nginx实例:

Short names:  nginx
Filenames:  nginx.conf
MIME types: text/x-nginx-conf
 1user www-data www-data;
 2worker_processes  1;
 3
 4events {
 5    worker_connections  1024;
 6}
 7
 8http {
 9    include       /etc/nginx/mime.types;
10    access_log	/var/nginx/log/access.log;
11}

squid配置文件(redis):

Short names:  squidconf, squid.conf, squid
Filenames:  squid.conf
MIME types: text/x-squidconf
 1# 注释说明
 2daemonize no
 3
 4pidfile /var/run/redis.pid
 5
 6port 6379
 7
 8# bind 127.0.0.1
 9
10# include /path/to/other.conf

various domain-specific languages

thrift:

Short names:  thrift
Filenames:  *.thrift
MIME types: application/x-thrift

protobuf:

Short names:  protobuf, proto
Filenames:  *.proto
MIME types: None

简单的

语言

Erlang实例:

Short names:  erlang
Filenames:  *.erl, *.hrl, *.es, *.escript
MIME types: text/x-erlang

Short names:  erl
Filenames:  *.erl-sh
MIME types: text/x-erl-shellsession
 1%% @author author <author@example.com>
 2%% @copyright YYYY author.
 3
 4%% @doc calllist analysis startup code
 5
 6-module(ca).
 7-author('author <author@example.com>').
 8-export([start/0]).
 9
10start(App) ->
11    case application:start(App) of
12        ok ->
13            ok;
14        {error, {already_started, App}} ->
15            ok
16    end.

php实例:

 Short names: php, php3, php4, php5
Filenames:  *.php, *.php[345], *.inc
MIME types: text/x-php
 1<?php
 2/*
 3 * 注释说明
 4 */
 5if (defined('ENVIRONMENT'))
 6{
 7	switch (ENVIRONMENT)
 8	{
 9		case 'development':
10			break;
11		default:
12			exit('The application environment is not set correctly.');
13	}
14}

mysql实例:

Short names:  mysql
Filenames:  None
MIME types: text/x-mysql
 1[client]
 2port		= 3306
 3socket		= /tmp/mysql.sock
 4#socket      = /var/run/mysqld/mysqld.sock
 5
 6[mysqld]
 7user        = mysql
 8port		= 3306
 9socket		= /tmp/mysql.sock
10

其他

配置文件configuration file formats

docker:

Short names:  docker, dockerfile
Filenames:  Dockerfile, *.docker
MIME types: text/x-dockerfile-config
 1[Service]
 2EnvironmentFile=-/etc/sysconfig/docker
 3EnvironmentFile=-/etc/sysconfig/docker-storage
 4EnvironmentFile=-/etc/sysconfig/docker-network
 5ExecStart=
 6ExecStart=/usr/bin/docker daemon -H fd:// $OPTIONS \
 7          $DOCKER_STORAGE_OPTIONS \
 8          $DOCKER_NETWORK_OPTIONS \
 9          $BLOCK_REGISTRY \
10          $INSECURE_REGISTRY

ini:

Short names:  ini, cfg, dosini
Filenames:  *.ini, *.cfg, *.inf
MIME types: text/x-ini, text/inf

properties(java):

Short names:  properties, jproperties
Filenames:  *.properties
MIME types: text/x-java-properties
1# the directory where the snapshot is stored.
2dataDir=/tmp/zookeeper
3# the port at which the clients will connect
4clientPort=2181
5# disable the per-ip limit on the number of connections since this is a non-production config
6maxClientCnxns=0
7initLimit=10
8syncLimit=5

apache配置文件:

Short names:  apacheconf, aconf, apache
Filenames:  .htaccess, apache.conf, apache2.conf
MIME types: text/x-apacheconf
<VirtualHost *:80>
        ServerName a.com
        ServerAdmin webmaster@localhost
        DocumentRoot /home/data/www/a
        ErrorLog /home/data/log/a_error.log
        CustomLog /home/data/log/a_access.log combined
</Virtualhost>
<VirtualHost *:80>
        ServerName b.com
    ServerAdmin webmaster@localhost
        DocumentRoot /home/data/www/b
        ErrorLog /home/data/log/b_error.log
        CustomLog /home/data/log/b_access.log combined
</Virtualhost>

CSS相关

css:

Short names:  css
Filenames:  *.css
MIME types: text/css

less:

Short names:  less
Filenames:  *.less
MIME types: text/x-less-css

数据文件格式:

Short names:  json
Filenames:  *.json
MIME types: application/json

主页

索引

模块索引

搜索页面