Laravel
server {
listen 80;
server_name we.smallzhou.cn;
index index.php index.html;
root /home/ubuntu/JasonHome/public;
location ~ .*.(svn|git|cvs) {
deny all;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php {
fastcgi_pass 127.0.0.1:9000;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
fastcgi_intercept_errors on;
access_log off;
}
ThinkPHP5
server {
listen 443;
server_name tp5.smallzhou.cn;
ssl on;
ssl_certificate /usr/local/nginx/conf/conf.d/cert/1_tp5.smallzhou.cn_bundle.crt;
ssl_certificate_key /usr/local/nginx/conf/conf.d/cert/2_tp5.smallzhou.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;
index index.php index.html;
root /home/ubuntu/Tp5AndSmallActionShop/public;
location ~ .*.(svn|git|cvs) {
deny all;
}
location /{
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
}
}
location ~ \.php {
fastcgi_pass 127.0.0.1:9000;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
fastcgi_intercept_errors on;
access_log off;
}