VPS侦探论坛

 找回密码
 注册
查看: 5876|回复: 2

lnmpa 如何实现 http 范文跳转到 https 麻烦军哥 各位大哥 给点建议

[复制链接]
发表于 2015-9-18 00:02:37 | 显示全部楼层 |阅读模式

如题,军哥  这个如何实现  下面是 vhost下面的配置文件内容
server
        {
                listen 80;
                #listen [::]:80;
                server_name xxx.xxx.com xxx.com;
                index index.html index.htm index.php default.html default.htm default.php;
                root  /home/wwwroot/xxx.xxx.com;
                keepalive_timeout   60;
                location / {
                        try_files $uri @apache;
                        }

                location @apache {
                        internal;
                        proxy_pass http://127.0.0.1:88;
                        include proxy.conf;
                        }

                location ~ [^/].php(/|$)
                        {
                                proxy_pass http://127.0.0.1:88;
                                include proxy.conf;
                        }
                location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$
                {
                    expires      30d;
                }

                location ~ .*.(js|css)?$
                {
                    expires      12h;
                }

                access_log  /home/wwwlogs/xxx.xxx.com.log  access;

        }

server
{
listen      443;
server_name xxx.xxx.com xxx.com;
index index.html index.htm index.php default.html default.htm default.php;
root  /home/wwwroot/xxx.xxx.com;

ssl on;
ssl_certificate /home/xxx.xxx.com.crt;
ssl_certificate_key /home/xxx.xxx.com.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

location ~ [^/].php(/|$)
                        {
                                proxy_pass http://127.0.0.1:88;
                                include proxy.conf;
                        }
access_log  off;
}
该如何修改 实现 http 跳转到 https ? 麻烦军哥给点建议 谢谢

[ 本帖最后由 phper 于 2015-9-18 16:32 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2015-9-18 09:56:02 | 显示全部楼层
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2015-9-18 16:31:46 | 显示全部楼层

回复 2# 的帖子


谢谢 军哥 我去试试
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-28 07:27 , Processed in 0.025493 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表