worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
###################################01业务################################
###################################################################################
server {
listen 80;
server_name localhost;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ .*\.(js|css|png|woff|ttf|woff2|jpg|gif)$ {
proxy_pass http://IP:8181;
}
location /isv {
proxy_pass http://IP:8181/docs/saas/api;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /docs/saas/ {
proxy_pass http://IP5:8181/docs/saas/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /mxz {
proxy_pass http://IP:8181/docs/tool_download/tool_download-1bmpnf3sjjsk5;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /docs/tool_download/ {
proxy_pass http://IP:8181/docs/tool_download/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /pyp {
proxy_pass http://IP:8181/docs/wiki?token=cQiIoaK83Iw1;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /docs/wiki/ {
proxy_pass http://IP:8181/docs/wiki/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
#######################################02业务############################
########################################################################
server {
listen 8080;
server_name localhost;
location / {
root html/mqcloud;
index index.html index.htm distribution.html;
}
}
#######################################03业务###########################
########################################################################
underscores_in_headers on;
upstream 域名 {
server 192.168.0.238;
}
server {
listen 443;
server_name 域名;
index index.html;
ssl on;
ssl_certificate /data/nginx/conf/gongsi/3220524_b.hkrt.cn.pem;
ssl_certificate_key /data/nginx/conf/gongsi/3220524_b.hkrt.cn.key;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://域名;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
#######################################04业务##############################
#########################################################################
server {
listen 443;
server_name 域名;
ssl on;
ssl_certificate /data/nginx/conf/maqian/3066254_maqian.hkrt.cn.pem;
ssl_certificate_key /data/nginx/conf/maqian/3066254_maqian.hkrt.cn.key;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_prefer_server_ciphers on;
location / {
root html/maqian;
index index.html index.htm;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
}