首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用nginx的403 FOrbidden索引

使用nginx的403 FOrbidden索引
EN

Server Fault用户
提问于 2022-01-16 20:40:19
回答 1查看 2.4K关注 0票数 0

晚上好。当我试图访问我的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;

代码语言:javascript
复制
# 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禁止的错误?提前谢谢。

EN

回答 1

Server Fault用户

发布于 2022-01-17 07:58:00

您没有在my-noip.domain.net中列出server_name,因此您的请求与配置的该部分不匹配,属于默认部分。见服务器_姓名文件

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/1090196

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档