【问题标题】:Apache 500 Internal Server Error on my virtual host [closed]我的虚拟主机上的 Apache 500 内部服务器错误 [关闭]
【发布时间】:2013-10-16 06:53:16
【问题描述】:

我的 Web 应用程序项目位于 /media/disk1/Projects 的文件夹中。我想使用http://lab/ 的 Apache 虚拟主机为他们提供服务。

这就是我设置虚拟主机的方式:

1.复制 /etc/apache2/sites-available/default 到 /etc/apache2/sites-available/lab

2。将 /etc/apache2/sites-available/lab 编辑为以下内容:

<VirtualHost *:80>
ServerAdmin tim@localhost
ServerName lab

DocumentRoot /media/disk1/Projects
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
# <Directory /var/www/>
<Directory /media/disk1/Projects>
    Require all granted
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>

3.将127.0.0.1 lab 添加到我的/etc/hosts:

127.0.0.1   localhost
127.0.0.1   lab

4.访问http://lab才得到500 Internal Server Error

所有子文件夹权限设置为drwxrwxrwx 但我的http://lab/phpmyadmin 有效。

帮我解决。谢谢。

【问题讨论】:

  • 你的错误日志是怎么说的?
  • 太多了。这里我刚刚上传了我的 /var/log/apache2/error.log goo.gl/DSjhEf
  • 这是我的 /var/log/apache2/access.log goo.gl/IuXT9a

标签: apache ubuntu virtualhost lamp vhosts


【解决方案1】:

通过查看此论坛解决了错误; http://boinc.berkeley.edu/dev/forum_thread.php?id=8603 在我的 /var/log/apache2/error.log 上,最后一个错误是:

[Wed Oct 09 09:10:04 2013] [crit] [client 127.0.0.1] configuration error:  couldn't perform authentication. AuthType not set!: /

所以我遵循了别人的解决方案并评论了这一行

# Require all granted

就在我的 /etc/apache2/sites-available/lab 和 TADA 下!我能够在浏览器中列出我的项目目录。

【讨论】:

  • 这是解决问题的正确答案。谢谢!
  • 修复了我的,虽然我无法解释为什么!!
  • 注释该行使我的错误转换为 403 禁止,因此显然它并不总是多余的。
猜你喜欢
  • 2015-04-29
  • 2021-03-28
  • 2017-06-02
  • 2016-06-10
  • 2013-08-02
  • 1970-01-01
  • 2016-10-28
  • 2015-09-26
相关资源
最近更新 更多