nginx配置aliyun https


本文摘自PHP中文网,作者PHP中文网,侵删。

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

server {

    listen 443;

    server_name www.goforit.com goforit.com;

    ssl on;

    ssl_certificate   cert/goforit.pem;

    ssl_certificate_key  cert/goforit.key;

    ssl_session_timeout 5m;

    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

    ssl_prefer_server_ciphers on;

    if ( $host != 'www.goforit.com' ){

        rewrite ^/(.*)$ $1 permanent;

    }      

    access_log  logs/access_www.log main;

    location / {

        root /usr/local/data/www/www;

        index index.php index.html;

    }      

    error_page 404 /missing.html;

    location ~ /\.ht {

        deny all;      

    }      

    location ~ \.php$ {

        root            /usr/local/data/www/www;

        fastcgi_pass  127.0.0.1:9000;

        fastcgi_index  index.php;

        fastcgi_param  SCRIPT_FILENAME  /usr/local/data/www/www$fastcgi_script_name;

        include        fastcgi_params;

    }

}

  

以上就是nginx配置aliyun https的详细内容,更多文章请关注木庄网络博客

相关阅读 >>

怎么解决nginx下php flush失效的问题

nginx如何做负载均衡

nginx的connection是什么?

nginx可以集群吗

nginx web服务器配置块有哪些?

nginx如何正确配置https

nginx四层负载均衡配置

nginx怎么配置默认端口

nginx用什么语言写的

linux如何启动nginx?

更多相关阅读请进入《aliyun》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...