500 errors.

Discussion in 'Installation/Configuration' started by Mazaire, May 2, 2014.

  1. Mazaire

    Mazaire New Member

    Hello!

    I currently have an issue with Apache2 on a Centos 6.4 base with ISPconfig3.

    Apache by default serves out the directory, /var/www with the FQDN www.example.com and example.com.

    However, I have a name based virtual-host (Generated through ISPconfig3) for www.example.com and example.com on the documentroot (symlink) /var/www/example.com/ -> /path/to/website. I have tried a few different methods of changing this such as changing the default DocumenRoot in httpd.conf to the symlink, but they do not feel very robust as there are a lot of directives on the /path/to/website directory and example.com virtual-host that ISPconfig3 has added for access control, ssl, etc.

    Is there a way to completely disable Apache to stop serving /var/www directory? Or alternatively is there a way to unbind /var/www from the servers FQDN/IP address? The clash in the domains and document roots is giving me a 500 error according to the error_log with apache.

    Ultimately I don't want to go into httpd.conf and change the DocumentRoot to /var/www/example.com, I am concerned that the access controls will not be in tune with ISPConfig and bleed some information like SSL private keys, chains and website configuration files.

    Thanks very much in advance! I appreciate the help! Please let me know if there is any information I have missed.

    P.s. I understand that I am getting 403 and 404 errors because it mismatches the document roots.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    What you miss is a default vhost. There are no changes in the httpd.conf, symlinks etc. required, so if you havent undone the cahnges yet, then please undo them first.

    Do you use * or the IP address in the websites in ispconfig?
    Is the hostname of your server example.com or www.example.com?
     
  3. Mazaire

    Mazaire New Member

    Thanks for the reply till!

    No changes were made to the httpd.conf file, in the access_log apache was saying that the /var/www/ was 403, and and sub dirs of that would throw 404, when I navigate to the example.com syslink, it throws a 500 error. I am using * in all of the configs, and no ips been set through the ISPconfig control panel.

    My hosts file looks like this:

    Code:
    127.0.0.1 localhost
    192.168.2.1 example.com example
    192.168.2.1 www.example.com example
    Code:
    [root@example]# hostname
     example
    [root@example]#

    The head of vhost in sites-enabled looks like this for example.com :

    Code:
    <Directory /var/www/example.com>
                    AllowOverride None
                    Order Deny,Allow
                    Deny from all
    </Directory>
    
    <VirtualHost *:80>
    
    .......
    Tail of the httpd.conf file looks like this:

    Code:
    NameVirtualHost *:80
    NameVirtualHost *:443
    Include /etc/httpd/conf/sites-enabled/

    Also is it wise to set serverAlias directive manually to point to the vhost or is there an automatic way of doing that through ISPconfig. Thanks again mate!
     

Share This Page