【发布时间】:2018-04-09 17:10:34
【问题描述】:
我无法调试nginx 中配置的子域之一的默认文档根目录,我已经尝试了here 中描述的所有有效解决方案。
在nginx版本上运行的Web服务器:nginx/1.10.3
问题是我需要弄清楚,这个 URL http://w.knexusgroup.com/ 或 http://w.knexusgroup.com/index.php 的根目录在哪里打印 1
在/usr/share/nginx/html/index.php我已经写了2。
下面是一些 nginx conf 的 sn-p:
include /etc/nginx/static/*.conf;
include /etc/nginx/saas_clients/*.conf;
index index.php index.html index.htm;
server {
listen 80;
server_name localhost;
root /mnt/codebase/httpdocs/saas;
location / {
root /usr/share/nginx/html;
index index.php index.html index.htm;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;
}
.
.
.
nginx -V
nginx版本:nginx/1.10.3
由 gcc 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) 构建
使用 OpenSSL 1.0.1k-fips 构建,2015 年 1 月 8 日
启用 TLS SNI 支持
配置参数:--prefix=/usr/share/nginx
【问题讨论】:
-
我尝试从这个stackoverflow.com/a/42815312/1589444 回答,但没有解决我,*.knexusgroup.com 的记录在 54.235.222.119,w3.knexusgroup.com 但它没有记录任何域.knexusgroup.com 。它适用于有正确定义根目录的地方,我无法弄清楚是什么问题,为什么我找不到任何与任何 ngiinx 配置不匹配的子域的根目录。
标签: nginx