Ryan Wang
你好,这是我的nginx的全部配置,路径是/etc/nginx/nginx.conf
load_module modules/ngx_pagespeed.so;
load_module modules/ngx_http_lua_module.so;
load_module modules/ndk_http_module.so;
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
keepalive_timeout 65;
include conf.sitemgr.d/main.conf;
include conf.sitemgr.d/global/conf/http.conf;
server_names_hash_max_size 512;
server_names_hash_bucket_size 128;
server {
# 监听端口
listen 80;
# 监听域名
#下面的域名我改了下,知道是什么意思就行
server_name demo.com;
server_name www.demo.com;
# 80映射到8090端口
#下面是http的时候用https登录后台显示正常,修改失败,是https的时候直接提示服务器错误。
location / {
client_max_body_size 50m;
proxy_pass http://127.0.0.1:8090;
}
}
}
stream {
log_format proxy '$remote_addr [$time_local] $protocol $status $bytes_sent $bytes_received $session_time "$upstream_addr" "$upstream_bytes_sent" "$upstream_bytes_received" "$upstream_connect_time"';
include conf.sitemgr.d/main_stream.conf;
}