UPUPW下Nginx虚拟主机配置 [ 2.0 版本 ]
server {
listen 80;
server_name admin.yj.mangxiaoquan.com alias;
location / {
root D:/upupw/vhosts/yii2-bjui/backend/web;
index index.html index.htm default.html default.htm index.php default.php app.php u.php;
include D:/upupw/vhosts/yii2-bjui/backend/web/up-*.conf;
}
autoindex off;
include advanced_settings.conf;
location ~ ^.+\.php {
root D:/upupw/vhosts/yii2-bjui/backend/web;
fastcgi_pass bakend;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi.conf;
}
location ~* ^.+.*\/(attachment|attachments|uploadfiles|avatar)\/.*\.(php|php5|phps|asp|aspx|jsp)$ {
deny all;
}
}
#server yj end}
server {
listen 80;
server_name www.yj.mangxiaoquan.com alias;
location / {
root D:/upupw/vhosts/yii2-bjui/frontend/web;
index index.html index.htm default.html default.htm index.php default.php app.php u.php;
include D:/upupw/vhosts/www.yj.mangxiaoquan.com/frontend/web/up-*.conf;
}
autoindex off;
include advanced_settings.conf;
location ~ ^.+\.php {
root D:/upupw/vhosts/yii2-bjui/frontend/web;
fastcgi_pass bakend;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi.conf;
}
location ~* ^.+.*\/(attachment|attachments|uploadfiles|avatar)\/.*\.(php|php5|phps|asp|aspx|jsp)$ {
deny all;
}
}
#server www.yj.mangxiaoquan.com end}
server {
listen 80;
server_name api.yj.mangxiaoquan.com alias;
location / {
root D:/upupw/vhosts/yii2-bjui/api/web;
index index.html index.htm default.html default.htm index.php default.php app.php u.php;
include D:/upupw/vhosts/yii2-bjui/api/web/up-*.conf;
# 如果找不到真实存在的文件,把请求分发至 index.php
try_files $uri $uri/ /index.php?$args;
}
autoindex off;
include advanced_settings.conf;
location ~ ^.+\.php {
root D:/upupw/vhosts/yii2-bjui/api/web;
fastcgi_pass bakend;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi.conf;
}
location ~* ^.+.*\/(attachment|attachments|uploadfiles|avatar)\/.*\.(php|php5|phps|asp|aspx|jsp)$ {
deny all;
}
}
#server api.yj.mangxiaoquan.com end}
qq3737002 河南郑州
注册时间:2015-03-29
最后登录:2022-07-04
在线时长:59小时26分
最后登录:2022-07-04
在线时长:59小时26分
- 粉丝31
- 金钱4498
- 威望170
- 积分6788
共 0 条评论