本帖最后由 子非月 于 2017-9-30 18:35 编辑
win2012 ngnix部署了腾讯的ssl怎么强制跳转到https
做了个301但是跳转网页打不开了
是需要重新写伪静态还是怎么改
- if (!-e $request_filename) {
- rewrite ^(.*)$ /index.php?s=/$1 last;
- }
- if ($host = ‘baidu.com’) {
- rewrite ^/(.*)$ http://baidu.com/$1 permanent;
- }
复制代码 或者在配置文件里改,跳转也是访问不了。谢谢各位大佬指点
- #START-SITE
- server {
- listen 80;
- server_name baidu.com;
- access_log logs/baidu.com.access.log;
- root D:/wwwroot/baidu.com;
- index index.html index.php index.htm index.asp index.aspx default.php default.html default.htm default.asp default.aspx ;
-
- include rewrite/baidu.com.conf;
-
- #START-ERROR-PAGE
- error_page 403 /403.html;
- error_page 404 /404.html;
- error_page 502 /502.html;
- #END-ERROR-PAGE
-
- #301-START
- #301-END
-
-
- #REFERER-START
- #REFERER-END
-
- #PROXY-START
- #PROXY-END
-
- #START-SSL
- listen 443 ssl;
- ssl_certificate ssl/baidu.com.crt;
- ssl_certificate_key ssl/baidu.com.key;
- ssl_session_cache shared:SSL:1m;
- ssl_session_timeout 5m;
- ssl_ciphers HIGH:!aNULL:!MD5;
- ssl_prefer_server_ciphers on;
- #END-SSL
-
- #START-PHP
- location ~ \.php$ {
- root D:/wwwroot/baidu.com;
- fastcgi_pass 127.0.0.1:4571;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- }
- #END-PHP
- }
- #END-SITE
复制代码
|
|