yeszao / dnmp

Docker LNMP (Nginx, PHP7/PHP5, MySQL, Redis)
https://resumis.com
MIT License
3.88k stars 1.4k forks source link

配置多域名不会生效 #594

Open ketianlin opened 3 weeks ago

ketianlin commented 3 weeks ago

在services/nginx/conf.d/test.cn.conf配置这个文件,内容如下 server { listen 80; server_name test.cn; root /www/test.cn; index index.php index.html index.htm;

access_log /dev/null;
error_log  /var/log/nginx/nginx.test.cn.error.log  warn;

error_page   500 502 503 504  /50x.html;
location = /50x.html {
    root   /usr/share/nginx/html;
}

location ~ [^/]\.php(/|$) {
    fastcgi_pass   php80:9000;
    include        fastcgi-php.conf;
    include        fastcgi_params;
}

} 然后在www的目录下面有一个test.cn的目录,里面就是一个index.php hosts也配置了,localhost test.cn docker exec -it nginx nginx -t 没有问题 docker exec -it nginx nginx -s reload 也重启了 但是范围的时候提示502

该网页无法正常运作test.cn 目前无法处理此请求。 HTTP ERROR 502

大佬可以帮忙看看吗

afu727 commented 3 weeks ago

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

jeeinn commented 2 weeks ago

试试把日志调整为info或debug级别,nginx和php-fpm的日志都看一看应该就能找到问题