homepage Welcome to WebmasterWorld Guest from 54.205.144.54
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
The Proverbial Head-Scratch
TheMadScientist




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

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




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

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

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

TheMadScientist




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

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




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

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




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

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




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

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




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

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




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

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).

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved