Apache和虚拟主机配置问题

时间:2016-03-29 22:21:47

标签: apache .htaccess virtualhost httpd.conf

所以我在同一台服务器和相同的IP地址上托管了两个网站。好吧没什么大不了的。我以我认为正确的方式设置了我的httpd.conf文件。第一个网站cascocc.com没问题。第二个网站coloradospringshomebuilders.com就是问题所在。它重定向到http://coloradospringshomebuilders.com/cgi-sys/defaultwebpage.cgi,而www别名不起作用。以下是我认为配置文件的相关部分,其余部分位于下面的粘贴框中。我也在下面列出了.htaccess文件。有什么想法吗?

每当我尝试访问文档根目录中的任何内容时,我都会收到403禁止错误。我该如何更正

http.conf file can be found here

.htaccess file for coloradospringshomebuilders.com

.htaccess file for cascocc.com

    <VirtualHost 216.172.182.170:80>
    ServerName 216.172.182.170
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin root@cas.cascocc.com
    <IfModule mod_suphp.c>
        suPHP_UserGroup nobody nobody
    </IfModule>
</VirtualHost>


# Default vhost for unbound IPs

<VirtualHost *>
    ServerName cas.cascocc.com
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin root@cas.cascocc.com
    <IfModule mod_suphp.c>
        suPHP_UserGroup nobody nobody
    </IfModule>
</VirtualHost><VirtualHost 216.172.182.170:80>
        ServerName cascocc.com
        ServerAlias www.cascocc.com
        DocumentRoot /home/cascocc/public_html
        ServerAdmin xxx@cascocc.com
        UseCanonicalName Off
        CustomLog /usr/local/apache/domlogs/cascocc.com combined
        CustomLog /usr/local/apache/domlogs/cascocc.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
        <IfModule itk.c>
            # For more information on MPM ITK, please read:
            #   http://mpm-itk.sesse.net/
            AssignUserID cascocc cascocc
        </IfModule>

        ScriptAlias /cgi-bin/ /home/cascocc/public_html/cgi-bin/




        # To customize this VirtualHost use an include file at the following location
        # Include "/usr/local/apache/conf/userdata/std/2_2/cascocc/cascocc.com/*.conf"
    </VirtualHost>

    # DO NOT EDIT. AUTOMATICALLY GENERATED.  IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.

    <VirtualHost 216.172.182.170:80>
        ServerName coloradospringshomebuilders.com
        ServerAlias www.coloradospringshomebuilders.com
        DocumentRoot /home/cascohomes/public_html
        ServerAdmin xxx@coloradospringshomebuilders.com
        UseCanonicalName Off
        CustomLog /usr/local/apache/domlogs/coloradospringshomebuilders.com combined
        CustomLog /usr/local/apache/domlogs/coloradospringshomebuilders.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
        <IfModule itk.c>
            # For more information on MPM ITK, please read:
            #   http://mpm-itk.sesse.net/
            AssignUserID cascohomes cascohomes
        </IfModule>

        ScriptAlias /cgi-bin/ /home/cascohomes/public_html/cgi-bin/




        # To customize this VirtualHost use an include file at the following location
        # Include "/usr/local/apache/conf/userdata/std/2_2/cascohomes/coloradospringshomebuilders.com/*.conf"
    </VirtualHost>

0 个答案:

没有答案