【发布时间】: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