我们的服务遍布中国

我们的服务遍布中国
乃至世界

光网所服务的品牌地域与城市
北京 天津 上海 广州 深圳 香港 厦门 江苏 浙江 山东
重庆 长沙 武汉 成都 西安 宁夏 丽江 青海 云南 乌鲁木齐
黑龙江 内蒙古 河北 ...
光网服务与合作的全球各地
美国 加拿大 德国 法国 英国 瑞士 意大利 荷兰
印度 日本 韩国 ...

不论你的品牌在何处
我们都可以提供完善的服务与帮助

致电

0512-56969630
您所在的位置:首页 > SSL证书

CentOS 配置范例

发布时间:2015/1/16 22:52:04 浏览:17309打印字号:

目录位置:/alidata/server/nginx-1.4.4/conf/vhosts

server {

listen       443 ssl;

server_name  localhost;

ssl          on;

ssl_certificate /alidata/server/nginx-1.4.4/conf/vhosts/www.gworg.com.pem;

ssl_certificate_key /alidata/server/nginx-1.4.4/conf/vhosts/www.gworg.com.key;

ssl_session_cache    shared:SSL:1m;

ssl_session_timeout  5m;

ssl_ciphers  HIGH:!aNULL:!MD5;

ssl_prefer_server_ciphers  on;        

location / {

root /alidata/www/default;

index  index.html index.htm hello.php index.php;

        }

location ~ .*\.(php|php5)?$ {

location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$

{

expires 30d;

}

location ~ .*\.(js|css)?$

{

expires 1h;

}

root /alidata/www/default;

fastcgi_pass   127.0.0.1:9000;

fastcgi_index  index.php;

fastcgi_param  HTTPS   on;

fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;

include        fastcgi_params;

#new line

include fastcgi.conf; 

            

        }

    }






server {

        listen       80;

        server_name  www.gworg.com; 

        rewrite ^(.*)$ https://$server_name$1 permanent; 

index index.html index.htm index.php;

root /alidata/www/default;

location ~ .*\.(php|php5)?$

{

#fastcgi_pass  unix:/tmp/php-cgi.sock;

fastcgi_pass  127.0.0.1:9000;

fastcgi_index index.php;

include fastcgi.conf;

}

location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$

{

expires 30d;

}

location ~ .*\.(js|css)?$

{

expires 1h;

}

#伪静态规则

include /alidata/server/nginx/conf/rewrite/default.conf;

access_log  /alidata/log/nginx/access/default.log;

}