Detailed configuration of Nginx

*, Nginx practical conf file configuration

#user nobody;#Configure a user or group, the default is nobody nobody.
#Nginx users and groups: user groups. Not specified under window
worker_processes 2;#The number of processes allowed to be generated, the default is 1
# worker process: number. Depending on the hardware adjustment, usually equal to the number of CPUs or 2 times the number of CPUs.
#error_log logs/error.log info;#Make the log path and level.

#pid logs/nginx.pid; #Specify the storage address of the nginx process running file

events {
    worker_connections 1024; #Maximum number of connections, the default is 512
}

http {
    include mime.types; #file extension and file type mapping table
    default_type application/octet-stream;#default file type, default is text/plain
    server_tokens off;#Cancel service log    

    log_format main '$remote_addr - $remote_user [$time_local] "$request" '#custom format

    access_log logs/access.log main;#combined is the default value of the log format

    sendfile off; #Allow sendfile mode to transfer files, the default is off

    keepalive_timeout 65; #Connection timeout, the default is 75s

    server {
        listen 80;#listen port
        server_name localhost;#listening address

        access_log  logs/access.log  main;

        location / {
            root html;#root directory
            index index.html index.htm;#Set the default page
        }
    }

}

 

*, Nginx practical system reference configuration

Path to use when uploading from the non-server side
file.url=http://domain name+port/caepm/dev
Path when storing to server:
file.root=root path where Nginx is located\\html\\caepm\\dev

 

 -------------------------------------------------- ------------Resources-------------------------------------- ------------------------

*, configure resource information 1

http://blog.csdn.net/tjcyjd/article/details/50695922

 

*, configuration resource information and its principle

http://www.cnblogs.com/knowledgesea/p/5175711.html

 

*, nginx dynamic and static separation introductory tutorial is good

http://blog.csdn.net/alli0968/article/details/47950481

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326775486&siteId=291194637