nginx域名跳转配置 Nginx泛解析的匹配域名绑定到子目录配置
#cat nginx.confusernginx nginx;
worker_processes8;
error_loglogs/error.log;
#error_loglogs/error.lognotice;
#error_loglogs/error.loginfo;
pid logs/nginx.pid;
worker_rlimit_nofile 51200;
events {
worker_connections 51200;
}
http {
include mime.types;
default_typeapplication/octet-stream;
#log_formatmain'$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
log_formatmylog'$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for' $request_time;
log_formatwww_log'$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_loglogs/access.log mylog;
fastcgi_intercept_errors on;
proxy_intercept_errors on;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 20m;
sendfile on;
tcp_nopush on;
keepalive_timeout65;
tcp_nodelay on;
server_tokens off;
gzipon;
gzip_min_length1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 8;
gzip_types text/plain application/x-javascript text/css application/xml text/javascript;
gzip_vary on;
include upstream.conf;
include vhost/*.conf;
}
页:
[1]