www.mxs223.com本机

基础配置

  1. server{
  2. listen 443 ssl;
  3. server_name mxs223.com www.mxs223.com;
  4. ssl_certificate /usr/local/nginx/cert/3043969_mxs223.com.pem;
  5. ssl_certificate_key /usr/local/nginx/cert/3043969_mxs223.com.key;
  6. add_header Access-Control-Allow-Origin $http_origin;
  7. location /{
  8. proxy_set_header Host $host;
  9. proxy_set_header X-Real-IP $remote_addr;
  10. proxy_set_header X-Real-Scheme 'Https';
  11. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  12. proxy_pass http://localhost:8081;
  13. }
  14. location ~ .*\.(js|css|jpg|png|eot|svg|ttf|woff|woff2|map|json)$
  15. {
  16. root /app/work/ssm_frame/;
  17. }
  18. }

80跳转

  1. server{
  2. listen 80 default_server;
  3. server_name www.mxs223.com mxs223.com;
  4. location /{
  5. rewrite ^/(.*) https://www.mxs223.com/$1 permanent;
  6. }
  7. }