查看问题详情
编号 | 项目 | 分类 | 查看权限 | 报告日期 | 最后更新 |
---|---|---|---|---|---|
0000577 | Anolis OS 8 | * OTHERS | public | 2021-11-24 16:41 | 2021-12-10 14:42 |
报告员 | anolislw | 分派给 | yunqi-zwt | ||
优先级 | normal | 严重性 | minor | 出现频率 | always |
状态 | assigned | 处理状况 | open | ||
平台 | x86_64 | 操作系统 | Anolis OS | 操作系统版本 | 8 |
标题 | 0000577: [Anolis8.4-x86_64] 安装nginx:1.18页面访问403问题 | ||||
描述 | [问题描述]: Anolis8.4-x86_64安装nginx:1.18 浏览器页面访问403问题, [环境详情] [root@qibo-lest02 html]# cat /etc/os-release NAME="Anolis OS" VERSION="8.4" ID="anolis" ID_LIKE="rhel fedora centos" VERSION_ID="8.4" PLATFORM_ID="platform:an8" PRETTY_NAME="Anolis OS 8.4" ANSI_COLOR="0;31" HOME_URL="https://openanolis.cn/" [root@qibo-lest02 html]# arch x86_64 [root@qibo-lest02 html]# uname -a Linux qibo-lest02 4.19.91-24.8.an8.x86_64 #1 SMP Tue Aug 31 11:30:53 CST 2021 x86_64 x86_64 x86_64 GNU/Linux [root@qibo-lest02 html]# dnf module list | grep nginx Warning: failed loading '/etc/yum.repos.d/nginx.repo', skipping. nginx 1.14 [d] common [d] nginx webserver nginx 1.16 common [d] nginx webserver nginx 1.18 [e] common [d] [i] nginx webserver [root@qibo-lest02 html]# nginx -v nginx version: nginx/1.18.0 [问题分析] index.html链接到不存在的文件导致(手动重建index.html,页面访问正常) [root@qibo-lest02 html]# rpm -ql nginx | grep conf /etc/nginx/fastcgi.conf /etc/nginx/fastcgi.conf.default /etc/nginx/nginx.conf /etc/nginx/nginx.conf.default [root@qibo-lest02 html]# rpm -ql nginx | grep nginx.conf /etc/nginx/nginx.conf /etc/nginx/nginx.conf.default [root@qibo-lest02 html]# cat /etc/nginx/nginx.conf | grep root root /usr/share/nginx/html; # root /usr/share/nginx/html; [root@qibo-lest02 html]# ll /usr/share/nginx/html total 16 -rw-r--r-- 1 root root 3896 Jul 21 15:31 404.html -rw-r--r-- 1 root root 3946 Jul 21 15:31 50x.html drwxr-xr-x 2 root root 4096 Nov 24 16:18 icons lrwxrwxrwx 1 root root 25 Jul 21 15:33 index.html -> ../../testpage/index.html #出错位置 -rw-r--r-- 1 root root 368 Jul 21 15:31 nginx-logo.png lrwxrwxrwx 1 root root 14 Jul 21 15:33 poweredby.png -> nginx-logo.png [复现步骤] dnf module install nginx:1.18 -y systemctl start nginx [root@qibo-lest02 html]# curl -I localhost:80 #或者浏览器输入:ip 访问 HTTP/1.1 403 Forbidden 0000403 Server: nginx/1.18.0 Date: Wed, 24 Nov 2021 08:40:43 GMT Content-Type: text/html Content-Length: 153 Connection: keep-alive | ||||
标签 | 没加标签. | ||||