VPS侦探论坛

 找回密码
 注册
查看: 3236|回复: 1

【求助】网站404无法访问

[复制链接]
发表于 2021-5-31 00:10:56 | 显示全部楼层 |阅读模式

设备信息系统:Debian(RaspberryPi ARM64)
运行内存:充足就对了
存储空间:USB挂载
安装方式:lnmp1.7脚本

指令以及返回:
root@raspberrypi:~# lnmp vhost add
+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              https://lnmp.org             |
+-------------------------------------------+
Please enter domain(example: www.lnmp.org): drive.shutdownserver.top
Your domain: drive.shutdownserver.top
Enter more domain name(example: lnmp.org *.lnmp.org):
Please enter the directory for the domain: drive.shutdownserver.top
Default directory: /home/wwwroot/drive.shutdownserver.top: /root/Desktop/USB/Web/NextCloud
Virtual Host Directory: /root/Desktop/USB/Web/NextCloud
Allow Rewrite rule? (y/n) n
You choose rewrite: none
Enable PHP Pathinfo? (y/n) y
Enable pathinfo.
Allow access log? (y/n) n
Disable access log.
Create database and MySQL user with same name (y/n) n
Add SSL Certificate (y/n) n


有几个特殊之处
1.使用了www.natfrp.com的映射服务,绑定了drive.shutdownserver.top这个域名并且在域名服务商CNAME解析到了端口映射服务商(正常访问),最终会解析到我的主机80端口上
2./root/Desktop/USB/是挂载进去的,目录拥有者是www,读写这些权限都是所有人
3.已重启
4.没有lnmp vhost add的域名是可以访问那个默认的目录的
5.在安装的默认目录/home/wwwroot/default下只能访问index.html,改个名字就不行(图片什么的可以访问)
6.直接访问drive.shutdownserver.top会显示404,访问drive.shutdownserver.top/index.html就403了。。

有什么的可以提问,我会补充的,谢谢各位大佬QAQ


补充内容 (2021-5-31 00:28):
说错了,应该是
直接访问drive.shutdownserver.top会显示403,访问drive.shutdownserver.top/index.html就404了

补充内容 (2021-5-31 00:32):
我还有一个在WinServer2016上的论坛,是Xenforo的,已经配置好了且正常访问。直接转移过来之后配置权限任何人可读写以及所有者是www,结果和上面一样...
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2021-5-31 09:47:05 | 显示全部楼层


只要是在 /root 下,不管属主属组是www还是,权限777 都肯定是无法访问,nginx本身就是www运行的,非要放 /root 下就只能把nginx使用root用户运行,但是安全性会有问题
只要不在 /root 目录下就行了
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-21 00:37 , Processed in 0.031552 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表