server {
listen 80 default_server;
listen [::]:80 default_server;
server_name testsadmin.weizpay.com;
root /usr/share/nginx/html/public;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / { //此段是TP5的跳转
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}
//此段是加载php-fpm以及运行机制
root /usr/share/nginx/html/public;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
//加载js或css文件,不然无法解析
location ~ .*\.(js|css)$ {
root /usr/share/nginx/html/public;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
listen 80 default_server;
listen [::]:80 default_server;
server_name testsadmin.weizpay.com;
root /usr/share/nginx/html/public;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / { //此段是TP5的跳转
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}
//此段是加载php-fpm以及运行机制
root /usr/share/nginx/html/public;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
//加载js或css文件,不然无法解析
location ~ .*\.(js|css)$ {
root /usr/share/nginx/html/public;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}