403 Error When a Site possess same domain as server

Discussion in 'Installation/Configuration' started by quest, Dec 9, 2011.

  1. quest

    quest New Member


    I've recently set up Ispconfig 3 on an Ubuntu 10.04 box using the perfect server tutorial.

    The Ispconfig server is called linuxserver1.domain.com. I have no problem accessing the ISpconfig control panel from this domain.

    I have a website hosting a company blog at www.domain.com. domain.com should also point to this blog site.

    I've set up the new site in Ispconfig and applied the www subdomain to it.

    However I'm receiving a 403 error when trying to access the site.

    I believe this is caused due to a conflict with the domain name of the site being identical to the domain name of Ispconfig.

    I have ~10 other sites, using different domains, up and running fine.

    Any suggestions are appreciated.
  2. falko

    falko Super Moderator ISPConfig Developer

    Please check the outputs of
    hostname -f
    and the contents of /etc/hosts.

    Is your server named www.domain.com (bad), or is it something like server1.domain.com (good)?
  3. quest

    quest New Member

    Hello Falko!

    First I want to personally thank you for producing such a fine open source project. This world can use more open source projects such as this in all aspects of development.


    @linuxserver1:~$ hostname
    @linuxserver1:~$ hostname -f
    And /etc/hosts:

    Code: localhost
    111.22.333.44  linuxserver1.domain.com linuxserver1
    # The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    Last edited: Dec 9, 2011
  4. falko

    falko Super Moderator ISPConfig Developer

    This looks fine.

    Can you post the www.domain.com vhost configuration?

    Did you check the website's error log?
  5. quest

    quest New Member

    From /etc/apache2/sites-available/domain.com.vhost:

    <Directory /var/www/domain.com>
        AllowOverride None
        Order Deny,Allow
        Deny from all
    <VirtualHost *:80>
          DocumentRoot /var/www/domain.com/web
        ServerName domain.com
        ServerAlias www.domain.com
        ServerAdmin [email protected]
        ErrorLog /var/log/ispconfig/httpd/domain.com/error.log
        <Directory /var/www/domain.com/web>
            Options FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
            <Files ~ '.php[s3-6]{0,1}$'>
                Order allow,deny
                Deny from all

    From /var/log/ispconfig/httpd/domain.com/error.log:

    [Mon Dec 12 19:56:14 2011] [error] [client] client denied by server configuration: /var/www/domain.com/web/wp-login.php
    Are these what you're looking for?
  6. quest

    quest New Member


    After reviewing the above posted domain.com.vhost It's obvious .php files are blocked.

    A few options in the Ispconfig control panel have the site up and running:

    php: Fast-Cgi (was disabled)[I'm not familiar with the difference between fast-cgi, CGI, modphp, or suphp - Fast-cgi seems to work so I'm sticking with it.]

    CGI: unchecked(was checked).


Share This Page