我的 Web 应用程序项目位于 /media/disk1/Projects 中的文件夹中。我想使用 Apache 虚拟主机为他们提供服务http://lab/
.
这就是我设置虚拟主机的方式:
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
works.
帮我解决一下。谢谢。
检查此论坛已解决错误;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 下面!我能够在浏览器中列出我的项目目录。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)