【发布时间】:2015-05-24 19:19:15
【问题描述】:
我只是想设置 localhost,让它指向我机器上的这个目录:
/home/mdobrenko/Sites
我创建了一个新的 conf 文件 (app.conf)
<VirtualHost *:80>
ServerAlias 192.168.1.66
ServerName localhost.dev
DocumentRoot /home/mdobrenko/Sites
<Directory /home/mdobrenko/Sites>
# Don't show directory index
Options -Indexes +FollowSymLinks +MultiViews
# Allow .htaccess files
AllowOverride All
# Allow web access to this directory
Require all granted
</Directory>
# Error and access logs
ErrorLog ${APACHE_LOG_DIR}/my-site.error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/my-site.access.log combined
当我尝试访问 localhost.dev 时,出现以下错误:
Forbidden
You don't have permission to access / on this server.
不过,我可以正常访问本地主机。
我是 Linux 和 Web 管理的新手 - 感谢任何帮助,我确信这是我在某个地方犯的一个愚蠢的错误......
【问题讨论】:
标签: apache ubuntu-14.04