标签:orm sock rip nginx serve permanent org ssi bytes
log_format weparts ‘$remote_addr [$time_iso8601] $request - $status "$http_user_agent" $body_bytes_sent $request_time‘;
server {
listen 80;
server_name 192.168.1.240 weparts.org *.weparts.org;
rewrite ^(.*)$ https://www.weparts.org$1 permanent;
}
server {
listen 443 ssl;
server_name www.weparts.org;
ssl_protocols TLSv1.2;
ssl_ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;
ssl_prefer_server_ciphers on;
ssl_certificate cert/www.weparts.org.crt;
ssl_certificate_key cert/www.weparts.org.key;
ssl_session_cache shared:SSL:5m;
ssl_session_timeout 10m;
charset utf-8;
access_log /var/log/nginx/weparts.access.log weparts;
gzip on;
gzip_types application/x-javascript text/css application/json;
location / {
proxy_pass http://127.0.0.1:8180;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect http:// https://;
}
location /webSocketServer {
proxy_pass http://127.0.0.1:8180;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
}
location /resources/ {
root /var/lib/tomcats/weparts/webapps/ROOT;
}
location /nginx {
stub_status on;
access_log off;
}
}
标签:orm sock rip nginx serve permanent org ssi bytes
原文地址:https://www.cnblogs.com/fengjunjie-w/p/8929034.html