This commit is contained in:
deepzz0
2016-10-02 00:11:15 +08:00
parent ddf508825c
commit ead9533be3
34 changed files with 359 additions and 181 deletions

View File

@@ -1,95 +1,131 @@
user www-data;
worker_processes 4;
pid /run/nginx.pid;
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
charset UTF-8;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
##
# Basic Settings
##
#access_log logs/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
#keepalive_timeout 0;
keepalive_timeout 65;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# Logging Settings
##
gzip on;
gzip_vary on;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip_comp_level 6;
gzip_buffers 16 8k;
##
# Gzip Settings
##
gzip_min_length 1000;
gzip_proxied any;
gzip_disable "msie6";
gzip on;
gzip_disable "msie6";
gzip_http_version 1.0;
gzip_min_length 1000;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript image/svg+xml;
##
# nginx-naxsi config
##
# Uncomment it if you installed nginx-naxsi
##
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript image/svg+xml;
#include /etc/nginx/naxsi_core.rules;
server {
listen 80;
server_name localhost;
##
# nginx-passenger config
##
# Uncomment it if you installed nginx-passenger
##
#charset koi8-r;
#passenger_root /usr;
#passenger_ruby /usr/bin/ruby;
#access_log logs/host.access.log main;
##
# Virtual Host Configs
##
location / {
root html;
index index.html index.htm;
}
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
include /data/eiblog/conf/nginx/domain/*.conf;
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}