Board logo

标题: [求助] 为什么后台生成的配置文件301跳转和开启htttps跳转不起作用 [打印本页]

作者: hrxiaofei    时间: 2018-4-7 14:16     标题: 为什么后台生成的配置文件301跳转和开启htttps跳转不起作用

为什么后台生成的配置文件301跳转和开启htttps跳转不起作用
用的是最新版的后台
  1. server {
  2.         listen       80;
  3.         root /www/web/test/public_html;
  4.         server_name test.com www.test.com;
  5.         rewrite ^(.*)$  https://$host$1 permanent;
  6.         index  index.html index.php index.htm;
  7.         rewrite ^/(.*)$ http://www.test.com/$1 permanent;
  8.         error_page  400 /errpage/400.html;
  9.         error_page  403 /errpage/403.html;
  10.         error_page  404 /errpage/404.html;
  11.         error_page  503 /errpage/503.html;
  12.         location ~ \.php$ {
  13.                 proxy_pass http://127.0.0.1:88;
  14.                 include naproxy.conf;
  15.         }
  16.         location ~ /\.ht {
  17.                 deny  all;
  18.         }
  19.         location / {
  20.                 try_files $uri @apache;
  21.         }
  22.         location @apache {
  23.                  internal;
  24.                  proxy_pass http://127.0.0.1:88;
  25.                  include naproxy.conf;
  26.         }
  27. }

  28. server {
  29.         listen       443;
  30.         root /www/web/test/public_html;
  31.         ssl                  on;
  32.         ssl_certificate      cert/test.com.pem;
  33.         ssl_certificate_key  cert/test.com.key;
  34.         ssl_prefer_server_ciphers on;
  35.         ssl_session_timeout 10m;
  36.         ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  37.         ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
  38.         server_name test.com www.test.com;
  39.         index  index.html index.php index.htm;
  40.         rewrite ^/(.*)$ http://www.test.com/$1 permanent;
  41.         error_page  400 /errpage/400.html;
  42.         error_page  403 /errpage/403.html;
  43.         error_page  404 /errpage/404.html;
  44.         error_page  503 /errpage/503.html;
  45.         location ~ \.php$ {
  46.                 proxy_pass http://127.0.0.1:88;
  47.                 include naproxy.conf;
  48.         }
  49.         location ~ /\.ht {
  50.                     deny  all;
  51.             }
  52.         location / {
  53.                 try_files $uri @apache;
  54.         }
  55.         location @apache {
  56.                  internal;
  57.                  proxy_pass http://127.0.0.1:88;
  58.                  include naproxy.conf;
  59.         }
  60. }
复制代码





欢迎光临 WDlinux官方论坛 (http://wdlinux.cn/bbs/) Powered by Discuz! 7.2