我在我的服务器电脑上安装了Ubuntu 12.04服务器版。我已经安装了LAMP服务器。我需要将/var/www的位置更改为我的辅助硬盘位置。我已经多次尝试在gedit /etc/apache2/sites-available/default中进行配置,以下是我的代码。
尽管如此,我仍然无法连接我的 /media/myserver,并且我的浏览器显示以下信息。
请告诉任何人如何将我的服务器挂载到我的var/www目录下,提前感谢。
<VirtualHost *:80>
ServerAdmin webmaster@localhost
#DocumentRoot /var/www
DocumentRoot /media/myserver/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
#<Directory /var/www/>
<Directory /media/myserver/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
而且也使用了
sudo chown -R var/www /media/myserver/
并且
chmod -R 755 /media/myserver/
尽管如此,我仍然无法连接我的 /media/myserver,并且我的浏览器显示以下信息。
Forbidden
You don't have permission to access / on this server.
请告诉任何人如何将我的服务器挂载到我的var/www目录下,提前感谢。