Apache 403错误禁止localhost

时间:2015-05-24 19:19:16

标签: apache ubuntu-14.04

我只是尝试设置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.

但我能够很好地访问localhost。

我是Linux和Web管理的全新手 - 感谢任何帮助,我确定这是我在某处犯下的一个愚蠢的错误......

1 个答案:

答案 0 :(得分:0)

    <Directory /home/mdobrenko/Sites>
# Don't show directory index
    Options -Indexes +FollowSymLinks +MultiViews

    # Allow .htaccess files
    AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
相关问题