lampp最新虚拟主机“禁止访问”

时间:2014-06-14 11:03:33

标签: apache xampp virtualhost lamp centos6

我在运行几个虚拟主机的CentOS 6机箱上运行灯泡,我的所有虚拟主机运行正常,除了我最近添加的那个(abacusnurseryschool.com)。

我还没有弄清楚为什么这是唯一无效的虚拟主机。我的root lampp / htdocs目录是被禁止的,但是我的虚拟主机可以访问的所有其他directorys都是(即samvella.co.uk)

是我的httpd-vhost.conf的副本

    # 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.
#
<VirtualHost *:80>
     DocumentRoot “/opt/lampp/htdocs/abacus/“
     ServerName abacusnurseryschool.com
     ServerAlias www.abacusnurseryschool.com
</VirtualHost>

<VirtualHost *:80>
     DocumentRoot “/opt/lampp/htdocs/betltc/“
     ServerName betltc.co.uk
     ServerAlias www.betltc.co.uk
</VirtualHost>

<VirtualHost *:80>
     DocumentRoot “/opt/lampp/htdocs/valeouse/“
     ServerName valeouse.co.uk 
     ServerAlias www.valeouse.co.uk
</VirtualHost>

<VirtualHost *:80>
     DocumentRoot “/opt/lampp/htdocs/valeouse/“
     ServerName samvella.co.uk
     ServerAlias www.samvella.co.uk
</VirtualHost>

所有虚拟主机都在与abacusnurseryschool.com分开工作,不知道为什么,所有其他虚拟主机都是前一段时间设置的,所以我可能也改变了其他文件?但我想不出还有什么需要改变。

此致 萨姆

1 个答案:

答案 0 :(得分:0)

简单,但常见的修复。重新加载Apache。

# sudo /etc/init.d/httpd reload