HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Installation/Configuration (
-   -   all subdomains work except www (

jasondavis87 11th July 2011 16:46

all subdomains work except www
Hello all,

I've searched the forums but didn't find anything on this:

My issue is that I have a website:
In my website i need all subdomains to goto the same place. I have a php file that parses the subdomain out and displays different data. So for example,,, need to point to the same place and the php script will handle displaying the different data.

I've gotten everything to work, except ""

Here's the other catch: i can ping and trace-route the "" and the "" and everything else and they come back with successful pings and correct IP address for traceroute.

I thought it was my DNS settings at first but since ping and trace-route work i'm not sure. either way, just to put all the information out there, I currently have these settings in my DNS:

www    A    300
@        A    300
@        ns  7200
@        ns  7200

These are my current settings. I've tried using the fqdm, "" tried using www CNAME 7200, tried using * A 300 Those didnt work either.

Now for my ISPConfig, I run CentOS 5.5 x64 and followed the perfect server guidelines for setting this up from this website. I should state, I am using a VPS from as well. There were some things i wasnt able to do and found workarounds for them, but this was with BIND server, which i currently have turned off due to using DNS and suPHP(i think). From what i read, this is due to the fact that I was using a vps.

In ISPConfig, I've created the website, the ftp connection for this and that all works, email works, etc. I set the website to use domains for all 3 options for subdomains, "none", "www", "*" - all actually produce the same result: all subdomains work except "www."

Any Help is appriciated. Thanks

jasondavis87 11th July 2011 16:58

Ok so i just made a mistake and accidently deleted the site. (thought i was deleting a subdomain). - I've got everything back up and running and same problem.

This time however, I had to add a dns record:

* A 300

Without this the other sub-domains didnt work. Now its back to everything works but

falko 12th July 2011 11:28

Can you post the Apache vhost configuration of

jasondavis87 12th July 2011 14:31


Originally Posted by falko (Post 259623)
Can you post the Apache vhost configuration of


<Directory /var/www/>
    AllowOverride None
    Order Deny,Allow
    Deny from all

<VirtualHost *:80>
      DocumentRoot /var/www/


    ErrorLog /var/log/ispconfig/httpd/

    ErrorDocument 400 /error/400.html
    ErrorDocument 401 /error/401.html
    ErrorDocument 403 /error/403.html
    ErrorDocument 404 /error/404.html
    ErrorDocument 405 /error/405.html
    ErrorDocument 500 /error/500.html
    ErrorDocument 503 /error/503.html

    <Directory /var/www/>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    <Directory /var/www/clients/client1/web5/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all

    # Clear PHP settings of this website
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler None
    # mod_php enabled
    AddType application/x-httpd-php .php .php3 .php4 .php5
    php_admin_value sendmail_path "/usr/sbin/sendmail -t -i"
    php_admin_value upload_tmp_dir /var/www/clients/client1/web5/tmp
    php_admin_value session.save_path /var/www/clients/client1/web5/tmp
        # PHPIniDir /var/www/conf/web5
    php_admin_value open_basedir /var/www/clients/client1/web5/web:/var/www/clients/client1/web5/tmp:/var/www/$

    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
      AssignUserId web5 client1

    <IfModule mod_dav_fs.c>
      # WEBDAV END


jasondavis87 12th July 2011 14:34

Wow ... I'm an idiot ... I just found the issue:

I forgot that I changed my c:\windows\system32\drivers\etc\hosts File to redirect my to my internal IP because i used to host it from my house and the router couldnt handle the loop back.

Thanks everyone for your help.

All times are GMT +2. The time now is 06:40.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.