- 积分
- 2
- 威望
-
- 金钱
-
- 注册时间
- 2017-4-6
- 在线时间
- 小时
- 最后登录
- 1970-1-1
|
VMware 安装 lnmp1.3,想配置多个端口,对应多个项目,总是进入nginx 欢迎页面。
nginx.conf 没有改变
vhost其中一个配置如下,如果是PHP文件就会报404,HTML文件就没问题。
server
{
listen 81;
#listen [::]:80;
server_name 192.168.1.107:81;
index index.html index.htm index.php default.html default.htm default.php
root /data/web/htdocs/php7.com/;
location / {
root /data/web/htdocs/php7.com/;
index index.html index.htm index.php default.html default.htm default.php;
}
#include thinkphp.conf;
#error_page 404 /404.html;
include enable-php.conf;
location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*.(js|css)?$
{
expires 12h;
}
location ~ /.
{
deny all;
}
access_log /home/wwwlogs/access.log;
error_log /home/wwwlogs/error.log;
} |
|