【发布时间】:2011-08-14 07:53:53
【问题描述】:
我是 ubuntu(和 Linux)的新手,有一个简单的问题。
我已挂载目录 /media/2A98EDD2ACA90087/WebProject/ 并想将 http:/localhost/ 从 var/www 移动到 /media/2A98EDD2ACA90087/WebProject/
我更改了 sites-enabled/000-default 和 /etc/apache2/sites-available
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /media/2A98EDD2ACA90087/WebProject
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /media/2A98EDD2ACA90087/WebProject>
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>
并且有这个 apache 消息!
禁止 您无权访问此服务器上的 /
当我创建“测试”目录并将 localhost 从 var/www 移动到 var/www/test 时 - 一切正常。我想是文件权限的问题??!我该怎么办?
问题已解决。谢谢帕特里克和约翰。确实需要授予对 index.html 的读取权限:chmod 644 /media/2A98EDD2ACA90087/WebProject/index.html
但我无法更改对 Ntfs 安装驱动器的访问权限。我必须重新安装
为什么不能在ubuntu上更改外置硬盘的权限归属组
【问题讨论】:
-
您好,这将更有可能在serverfault.com上获得建设性答案
标签: apache ubuntu localhost mount