繁体   English   中英

Apache 403错误禁止本地主机

[英]Apache 403 error forbidden 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管理的新手-可以提供任何帮助,我相信这是我在某个地方犯的一个愚蠢的错误...

    <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>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM