Welcome to WebmasterWorld Guest from 54.147.0.174

Forum Moderators: bakedjake

Message Too Old, No Replies

The Proverbial Head-Scratch

     

TheMadScientist

6:11 pm on Mar 26, 2011 (gmt 0)

WebmasterWorld Senior Member themadscientist is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



Ok, I'm not normally the 'server guy' ... httpd.conf? Yeah, been there, done a bit of that, but I don't normally set the whole server up, hasn't been my 'thing', but I figured it was time to learn something new, and now I'm doing a complete head-scratch.

Here's where I'm at:
CentOS - Loaded and Running
Apache 2.2 - Loaded and Running
PHP & MySql - Loaded and Running

NOTE: Multiple IP Addresses

I set the httpd.conf with virtual hosting for IP Addr A & IP Addr B

... so far, so good...

Got everything running at the IP level, so when I access IP Addr A I get the directory I should for IP Addr A; Same thing for IP Addr B.

Step 7247 ... I pointed a domain name to IP Addr B via A record.

No Problem ... Until:
I woke up this am and I can access everything like I should be able to via IP Addr, but not via domain name like I could last night? (Server Not Found via Domain Name)

Is this likely to be a propagation issue or is there something it sounds like I'm missing? I would think this is a "works or doesn't" thing on my side and I didn't change anything from "works" between going to bed last night and getting up this am (unless I've been sleep admining, which imo is unlikely), but somehow 'works' switched to 'doesn't work' and now I'm scratching my head...

Any thoughts?

caribguy

6:56 pm on Mar 26, 2011 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



What generates this message? (Server Not Found via Domain Name)

Can you do nslookup addrB - is it the expected ip address?

TheMadScientist

7:07 pm on Mar 26, 2011 (gmt 0)

WebmasterWorld Senior Member themadscientist is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



When I run a nslookup on the IP Address B I get the hosting co. nameserver IP Address ... When I run one on the pointed domain name I get the assigned IP Address (B) ... So it's looking like it's on my side, even though it worked last night?

Moving on from the Head-Scratch to the also Proverbial Head-Shake ... lol

TheMadScientist

8:14 pm on Mar 26, 2011 (gmt 0)

WebmasterWorld Senior Member themadscientist is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



Okay, now I'm totally confused ... I switched back to name based virtual hosts to see what happened, and I still get Server Not Found when trying to access the pointed domain in the browser, but (very strange, imo) when I try to access the two respective IP Addresses I end up at different places?

EG When I open IP Address A in the browser I get the 'main site' doc root index.
When I open IP Address B in the browser I get the 'virtual host' document root index.

Yes, I even cleared my cache...

I don't have any distinction in the httpd.conf based on IP Addr, so I should get the main server (site) doc root index for both IP Addresses, right?

TheMadScientist

8:32 pm on Mar 26, 2011 (gmt 0)

WebmasterWorld Senior Member themadscientist is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



Okay x 2 ... I deleted the virtual host container for the pointed domain name altogether and now I get the 'main site' index file via both IP Addresses ... There's something silly I'm missing and I'm not sure what it is?

caribguy

9:54 pm on Mar 26, 2011 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Assuming that your dns server is set up correctly, and that you've set up, at a minimum...

NameVirtualHost aaa.bbb.ccc.ddd:80
NameVirtualHost aaa.bbb.ccc.eee:80

and

<VirtualHost aaa.bbb.ccc.ddd:80>
ServerName www.example.com
DocumentRoot /usr/local/www/example.com
</VirtualHost>

<VirtualHost aaa.bbb.ccc.eee:80>
ServerName www.example.net
DocumentRoot /usr/local/www/example.net
</VirtualHost>

and

<Directory "/usr/local/www/example.com">
Order allow,deny
Allow from all
</Directory>

<Directory "/usr/local/www/example.net">
Order allow,deny
Allow from all
</Directory>

things 'should' work ;)

TheMadScientist

10:38 pm on Mar 26, 2011 (gmt 0)

WebmasterWorld Senior Member themadscientist is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



Thanks for the help, I think I tracked it down ... It worked last night when I went to bed, but not this am ... Something had to change, and I kept trying to figure out what happened with the secondary domain / httpd.conf but I don't think that's where the problem was ... I think it is because I added the main server name to the DNS System as a server (go with the point if my terminology is off a bit) and put the IP Address of the secondary domain as the second IP Address. I just changed it ... It makes sense (to me anyway), because that would have populated after I went to bed ... Other than that, nothing should have changed.

I know the virtual host containers and permissions were (are) set up correctly, because when I use only the IP Addresses I end up in the right place ... If my permissions were off, I wouldn't have access, even by IP Address, and I wouldn't see the correct index.ext page for the given IP Address if the Virtual Host settings were incorrect, so it has to have something to do with the registration of server.example.com with the DNS System and the IP Address(es) I used, I think, for now anyway (lol).

TheMadScientist

9:26 pm on Mar 27, 2011 (gmt 0)

WebmasterWorld Senior Member themadscientist is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



Alright ... Just for future readers: The problems WAS setting the IP Address I pointed the secondary domain name to as one of the IP Addresses for the server in the DNS System ... I changed it yesterday, shut the server down last night to make sure everything was 'cold and cleared', started it back up today and can connect via domain name and IP Address using the same httpd.conf as would not work yesterday.

I'm actually glad I went ahead an posted this, because I'm sure others will probably run into the same issue in the future, so hopefully they'll find this thread and know where to look ... Of course the title doesn't do much to describe the issue, so they might not ever click on it, but it's still here at least (lol).
 

Featured Threads

Hot Threads This Week

Hot Threads This Month