123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- # For more information on configuration, see:
- # * Official English Documentation: http://nginx.org/en/docs/
- # * Official Russian Documentation: http://nginx.org/ru/docs/
- user nginx;
- worker_processes auto;
- error_log /var/log/nginx/error.log;
- pid /run/nginx.pid;
- # Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
- include /usr/share/nginx/modules/*.conf;
- events {
- worker_connections 1024;
- }
- http {
- 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;
- tcp_nodelay on;
- keepalive_timeout 65;
- types_hash_max_size 4096;
- include /etc/nginx/mime.types;
- default_type application/octet-stream;
- # Load modular configuration files from the /etc/nginx/conf.d directory.
- # See http://nginx.org/en/docs/ngx_core_module.html#include
- # for more information.
- include /etc/nginx/conf.d/*.conf;
- server {
- listen 80;
- server_name kxmall.vip;
- root /usr/share/nginx/html;
- try_files $uri $uri/ /index.html;
- # Load configuration files for the default server block.
- include /etc/nginx/default.d/*.conf;
- gzip on;
- gzip_min_length 1k;
- gzip_buffers 4 16k;
- gzip_http_version 1.1;
- gzip_comp_level 9;
- gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php application/javascript application/json;
- gzip_disable "MSIE [1-6]\.";
- gzip_vary on;
- error_page 404 /404.html;
- location = /404.html {
- }
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- }
- }
- server {
- listen 80;
- server_name h5.kxmall.vip;
- try_files $uri $uri/ /index.html;
- gzip on;
- gzip_min_length 1k;
- gzip_buffers 4 16k;
- gzip_http_version 1.1;
- gzip_comp_level 9;
- gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php application/javascript application/json;
- gzip_disable "MSIE [1-6]\.";
- gzip_vary on;
- location / {
- try_files $uri $uri/ /index.html;
- root /usr/share/nginx/app;
- }
- error_page 404 /404.html;
- location = /404.html {
- }
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- }
- }
- server {
- listen 80;
- server_name rider.kxmall.vip;
- gzip on;
- gzip_min_length 1k;
- gzip_buffers 4 16k;
- gzip_http_version 1.1;
- gzip_comp_level 9;
- gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php application/javascript application/json;
- gzip_disable "MSIE [1-6]\.";
- gzip_vary on;
- location / {
- try_files $uri $uri/ /index.html;
- root /usr/share/nginx/rider;
- }
- error_page 404 /404.html;
- location = /404.html {
- }
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- }
- }
- upstream server {
- ip_hash;
- server 172.30.0.60:8585;
- }
- server {
- listen 8585;
- server_name localhost;
- location / {
- proxy_set_header Host $http_host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header REMOTE-HOST $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_pass http://server/;
- }
- error_page 404 /404.html;
- location = /404.html {
- }
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- }
- }
- server {
- listen 443 ssl;
- server_name _;
- ssl_certificate /etc/nginx/cert/7963236_www.kxmall.vip.pem; # /etc/nginx/cert/ 为docker映射路径 不允许更改
- ssl_certificate_key /etc/nginx/cert/7963236_www.kxmall.vip.key; # /etc/nginx/cert/ 为docker映射路径 不允许更改
- ssl_session_cache shared:SSL:1m;
- ssl_session_timeout 10m;
- ssl_ciphers HIGH:!aNULL:!MD5;
- ssl_prefer_server_ciphers on;
- location / {
- proxy_set_header Host $http_host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header REMOTE-HOST $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_pass http://server/;
- }
- error_page 404 /404.html;
- location = /40x.html {
- }
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- }
- }
- }
|