晚上好。当我试图访问我的wordpress时出现了这个错误:port/danapcu.com( wordpress安装在这里: /var/www/html/danapcu.com)。此外,我的nginx默认端口是85 (因此我的wordpress应该在这个端口85上访问,因为端口80被apache占用,为我的owncloud服务)。当我访问-noip.domain.net:18601/danapcu.com时(端口映射在moy路由器中,如: http协议内部端口: 85 -外部端口:18601- localip (raspberrypi的ip))。我首先得到一个重定向: my-noip.domain.net:85/danapcu.com - error -然后手动将端口更改为18601,然后得到403个禁止的错误。在/var/log/nginx/error.log中,我有以下内容:"*2目录索引"/var/www/html/danapcu.com/“,客户机: PUBLIC_IP,server:_,请求:"GET /danpacu.com/ HTTP/1.1",主机:"MYNOIP.DOMAIN.net:18601”。
我的nginx/站点的结构--可查/danapcu.com是这样的:
服务器{听85;听:85;
# include snippets/snakeoil.conf;
root /var/www/html/danapcu.com;
# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;
server_name danpacu.com www.danpacu.com;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php;
autoindex on;
}
# pass PHP scripts to FastCGI server
#
location ~ \.php$ {
include snippets/fastcgi-php.conf;
#
# # With php-fpm (or other unix sockets):
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
}任何人,请帮助我了解发生了什么,我如何从我的noip域访问我的wordpress?为什么我要把这个重定向到端口85,然后是403禁止的错误?提前谢谢。
发布于 2022-01-17 07:58:00
您没有在my-noip.domain.net中列出server_name,因此您的请求与配置的该部分不匹配,属于默认部分。见服务器_姓名文件。
https://serverfault.com/questions/1090196
复制相似问题