Ubuntu、Apache、虚拟主机和访问被禁止

发布于 2024-12-27 14:51:34 字数 185 浏览 2 评论 0原文

我将虚拟主机设置为:此处。我的目录位于我的主文件夹中。当我尝试输入我的新域或任何地方时,我收到 403 错误:/

发生了什么?

I made virtualhost like: here. My directory is in my home folder. When I try to enter my new domain or anywhere I get 403 error:/

What happened?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

想你的星星会说话 2025-01-03 14:51:34

您可以在日志文件中给出错误的详细信息,

/var/log/apache2/error_log

apache 可能需要读取以下文件:

/home/.htaccess
/home/user/.htacces
[...]
/home/user/path/to/project/.htaccess

You can give the details of the error in the log file

/var/log/apache2/error_log

apache probably need read access to the following documents:

/home/.htaccess
/home/user/.htacces
[...]
/home/user/path/to/project/.htaccess
落日海湾 2025-01-03 14:51:34

如果您仍然陷入困境,我会回答这个问题。

我认为您已经以正确的方式设置了权限。下一步是检查您的主文件夹是否已加密?如果是这样,这可能是你的问题。将文件放在主文件夹之外的文件夹中,并授予访问该文件夹所需的权限。

I answer this question in the case you are still stuck.

I presume that you have set the permissions the correct way. The next step is to check if your home folder is encrypted? If so this might be your problem. Put you files in an folder outside of the home folder and give the permissions needed to access the folder.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文