码迷,mamicode.com
首页 > 其他好文 > 详细

nginx 站点80跳443配置

时间:2016-12-15 14:10:45      阅读:211      评论:0      收藏:0      [点我收藏+]

标签:man   ica   server   index.php   dex   html   http   char   hack   

server {
listen 80;
server_name www.furhacker.cn;
location /{
# return 301;
rewrite ^(.*)$ https://$host$1 last;
#rewrite ^(.*)$ https://$host$1 permanent;
}
}

server {
listen 443;
server_name www.furhacker.cn;
root html;
index index.html index.php index.htm;
error_page 400 /errpage/400.html;
error_page 403 /errpage/403.html;
error_page 404 /errpage/404.html;

ssl on;
ssl_certificate_key server.key;
ssl_certificate server.pem;

location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
include rewrite/***.conf;
#charset koi8-r;

#access_log logs/host.access.log main;
location / {
root html;
index index.php index.html index.htm;
}

nginx 站点80跳443配置

标签:man   ica   server   index.php   dex   html   http   char   hack   

原文地址:http://www.cnblogs.com/lhlucky/p/6182751.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!