ngnix部署了腾讯的ssl怎么强制跳转到https
本帖最后由 子非月 于 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_namebaidu.com;
access_loglogs/baidu.com.access.log;
root D:/wwwroot/baidu.com;
indexindex.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_keyssl/baidu.com.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout5m;
ssl_ciphersHIGH:!aNULL:!MD5;
ssl_prefer_server_cipherson;
#END-SSL
#START-PHP
location ~ \.php$ {
root D:/wwwroot/baidu.com;
fastcgi_pass 127.0.0.1:4571;
fastcgi_indexindex.php;
fastcgi_paramSCRIPT_FILENAME$document_root$fastcgi_script_name;
include fastcgi_params;
}
#END-PHP
}
#END-SITE
----------------------------------------------------------------------------------------------------
菜鸟团队技术博客:点击联系 win面板没那个功能,我自己再配置文件里加了代码可以了
页:
[1]