我的Web应用程序项目位于/ media / disk1 / Projects中的文件夹中。我想使用的Apache虚拟主机为他们提供服务http://lab/
。
这是我设置虚拟主机的方式:
1.将/ etc / apache2 / sites-available /默认复制到/ 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
作品。
帮我解决。谢谢。
通过查看此论坛解决了错误;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下!我能够在浏览器中列出我的Projects目录。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句