nginx.conf laravel 配置

server {

listen 443;

server_name www.liuhuanguang.cn; #填写绑定证书的域名

ssl on;

ssl_certificate cert/1_www.liuhuanguang.cn_bundle.crt;

ssl_certificate_key cert/2_www.liuhuanguang.cn.key;

ssl_session_timeout 5m;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #按照这个协议配置

ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;#按照这个套件配置

ssl_prefer_server_ciphers on;

root /home/centos/bbs/public;

index index.html

index.php;

location / {

try_files $uri $uri/

/index.php$is_args$query_string;

}

location ~ \.php$ {

try_files $uri =404;

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME

$document_root$fastcgi_script_name;

include fastcgi_params;

}

}

server {

listen 80;

server_name www.liuhuanguang.cn;

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

}