首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >403禁止-许可- VHOSTS

403禁止-许可- VHOSTS
EN

Stack Overflow用户
提问于 2016-06-23 10:29:59
回答 1查看 825关注 0票数 0

我无法访问我的vhost(只有默认的vhost,localhost)。它让我:

已禁用 您没有权限访问此服务器上的/。

我已经在我的httpd.conf中加载了模块,我在Apache2.4上,并且我已经检查了所有权限文件夹(chmod 755)。

我的httpd-vhosts.conf文件:

代码语言:javascript
复制
# Virtual Hosts
#
# Required modules: mod_log_config

# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at 
# <URL:http://httpd.apache.org/docs/2.4/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
Listen 80

<VirtualHost *:80>
ServerName localhost
DocumentRoot "/Library/WebServer/Documents"
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "/Users/POlo/Sites/polohome"
    ServerName polohome
    # Set access permission
    <Directory "/Users/POlo/Sites/polohome">
    DirectoryIndex index.html index.php
    Require all granted
    </Directory>
</VirtualHost>

<VirtualHost *:80>
        DocumentRoot "/Users/POlo/Sites/aeglos"
        ServerName aeglos
        ErrorLog "/private/var/log/apache2/aeglos.local-error_log"
        CustomLog "/private/var/log/apache2/aeglos.local-access_log" common

        <Directory "/Users/POlo/Sites/aeglos/">
                AllowOverride All
                Order allow,deny
                Allow from all
        </Directory>
</VirtualHost>

我发现的唯一一件事是,当更改DirectoryIndex文件中的httpd.conf时,它在不执行它的情况下为我提供了一个php行。并且在httpd-vhosts.conf文件中添加directoryIndex没有任何作用。

谢谢你帮忙。

更新:不明白为什么..。但是,当切换到PHP5.6时,它是工作的,在PHP 7.0.6上,它仍然为我提供了403禁止页面。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-06-26 15:31:52

(代表“任择议定书”张贴)。

升级我的mac后,我的php切换器没有工作,因为php7_module没有在httpd.conf中调用它。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37989051

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档