#1  
Old 11th July 2011, 15:46
jasondavis87 jasondavis87 is offline
Junior Member
 
Join Date: Jul 2011
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default 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: domain.com
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, example1.domain.com, example2.domain.com, example3.domain.com need to point to the same place and the php script will handle displaying the different data.

I've gotten everything to work, except "www.domain.com"

Here's the other catch: i can ping and trace-route the "www.domain.com" and the "domain.com" 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:
Code:
www    A    300    123.123.123.123
@        A    300    123.123.123.123
@        ns   7200  ns1.zoneedit.com
@        ns   7200  ns2.zoneedit.com
These are my current settings. I've tried using the fqdm, "www.domain.com." tried using www CNAME 7200 domain.com, tried using * A 300 123.123.123.123. 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 fanaticalvps.com 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 zoneedit.com 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
Reply With Quote
Sponsored Links
  #2  
Old 11th July 2011, 15:58
jasondavis87 jasondavis87 is offline
Junior Member
 
Join Date: Jul 2011
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default Mistake

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 123.123.123.123

Without this the other sub-domains didnt work. Now its back to everything works but www.domain.com
Reply With Quote
  #3  
Old 12th July 2011, 10:28
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Can you post the Apache vhost configuration of domain.com?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #4  
Old 12th July 2011, 13:31
jasondavis87 jasondavis87 is offline
Junior Member
 
Join Date: Jul 2011
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by falko View Post
Can you post the Apache vhost configuration of domain.com?
Code:
<Directory /var/www/domain.com>
    AllowOverride None
    Order Deny,Allow
    Deny from all
</Directory>

<VirtualHost *:80>
      DocumentRoot /var/www/domain.com/web

    ServerName domain.com
    ServerAlias www.domain.com
    ServerAdmin webmaster@domain.com

    ErrorLog /var/log/ispconfig/httpd/domain.com/error.log


    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/domain.com/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /var/www/clients/client1/web5/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>


    # Clear PHP settings of this website
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler None
    </FilesMatch>
    # mod_php enabled
    AddType application/x-httpd-php .php .php3 .php4 .php5
    php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@domain.com"
    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/domain.com$

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

    <IfModule mod_dav_fs.c>
      # DO NOT REMOVE THE COMMENTS!
      # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
      # WEBDAV END
    </IfModule>


</VirtualHost>
Reply With Quote
  #5  
Old 12th July 2011, 13:34
jasondavis87 jasondavis87 is offline
Junior Member
 
Join Date: Jul 2011
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
 
Default

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 www.domain.com 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.
Reply With Quote
The Following User Says Thank You to jasondavis87 For This Useful Post:
falko (13th July 2011)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cron issue in Debian 6 Nolan Installation/Configuration 6 18th April 2011 16:36
Quota Exceeded errors IKShadow Installation/Configuration 14 20th January 2011 16:39
Mailscanner+header_checks not work wizard Server Operation 2 24th October 2008 16:48
email problems mrtornado79 Installation/Configuration 8 27th January 2008 20:27
Same host 'www' at (n) domain at the same ip doesn't work OdinsChrist Installation/Configuration 2 16th November 2006 19:44


All times are GMT +2. The time now is 10:43.


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