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; #tcp_nopush on; keepalive_timeout 65; #gzip on; map $http_upgrade $connection_upgrade { default upgrade; '' close; } upstream websocket { server 172.16.0.217:9002; server 172.16.0.107:9002; } server { listen 80; server_name _; #charset koi8-r; #access_log logs/host.access.log main; location / { index index.html; root /opt/nginx-web/iphm/; autoindex on; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location ^~ /in-link/ { proxy_pass http://127.0.0.1:7900; } location ^~ /websocket/alarm { proxy_pass http://websocket; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; } } server { listen 8888; server_name _; location / { index index.html; root /opt/nginx-web/config/; autoindex on; } } server{ listen 6788; server_name localhost; location / { index index.html; root /opt/nginx-web/phm-yanhua/; autoindex on; } } server{ listen 6789; server_name localhost; location / { index index.html; root /opt/nginx-web/web-yanhua/; autoindex on; } } # HTTPS server # server { listen 678 ssl; server_name localhost; ssl on; ssl_certificate /usr/local/webserver/nginx/ssl/scs1534484003141/Nginx/server.crt; ssl_certificate_key /usr/local/webserver/nginx/ssl/scs1534484003141/Nginx/server.key; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #按照这个协议配置 ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;#按照这个套件配置 ssl_prefer_server_ciphers on; location / { index index.html; root /opt/nginx-web/phm-yanhua/; autoindex on; } location /websocket { proxy_pass http://ilinecloud.com; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } location /zuul { rewrite ^(/zuul)(.*)$ $2 break; proxy_pass http://ilinecloud.com:3001; } location /grafana { rewrite ^(/grafana)(.*)$ $2 break; proxy_pass http://ilinecloud.com:3000; } } server { listen 300 ssl; server_name localhost; ssl on; ssl_certificate /usr/local/webserver/nginx/ssl/scs1534484003141/Nginx/server.crt; ssl_certificate_key /usr/local/webserver/nginx/ssl/scs1534484003141/Nginx/server.key; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #按照这个协议配置 ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;#按照这个套件配置 ssl_prefer_server_ciphers on; location / { proxy_pass http://ilinecloud.com:3000$request_uri; } location ^~/pubilc/ { proxy_pass http://ilinecloud.com:3000$request_uri; } } server { listen 3001; server_name localhost; location / { #index index.html; #root /opt/nginx-web/iphm/; proxy_pass http://172.16.0.107:8102; } } server { listen 443; server_name www.ilinecloud.com; ssl on; ssl_certificate cert/server.crt; ssl_certificate_key cert/server.key; ssl_session_timeout 5m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; ssl_prefer_server_ciphers on; location / { proxy_pass http://172.16.0.107:8102; } location ^~ /wechat { rewrite ^(/wechat)(.*)$ $2 break; proxy_http_version 1.1; proxy_set_header Connection ""; proxy_pass http://172.16.0.65:8100; } location ^~ /in-link/ { proxy_pass http://127.0.0.1:7900; } location ^~ /in-link-test/ { proxy_pass http://127.0.0.1:7900; } } }