game_over Posted January 14, 2015 Share Posted January 14, 2015 I have setup a CentOS web server within my works network as we previously hosted a few web pages on IIS which is rubbish. I've created a DNS record on the server (Win Server 2012): websvr.domain.local => 10.83.112.14 which works great across the entire network... It points to the DocumentRoot on the server. However, I have split off the different sites/apps we run into named virtual host containers. In the real world I would either setup a domain name to this or edit my local hosts file to point some-name.domain.local to the IP address. Is it possible to do something like this server wide, allowing to make the change on the server so that everyone on the network can access it? Link to comment Share on other sites More sharing options...
+BudMan MVC Posted January 14, 2015 MVC Share Posted January 14, 2015 yeah just create new dns records that point to your virtual host names. So if you created say virtual host that is something.domain.local then create a A record that points something.domain.local to whatever IP your hosting that site off of. Link to comment Share on other sites More sharing options...
game_over Posted January 14, 2015 Author Share Posted January 14, 2015 yeah just create new dns records that point to your virtual host names. So if you created say virtual host that is something.domain.local then create a A record that points something.domain.local to whatever IP your hosting that site off of. Thats what i thought. 1st DNS record: websvr.domain.local => 10.83.112.14 in the httpd.conf on Apache(CentOS): <VirtualHost *:80> DocumentRoot /var/www/html ServerName websvr.domain.local ServerAlias websvr.domain </VirtualHost> 2nd DNS record: intranet.domain.local => 10.83.112.14 <VirtualHost *:80> DocumentRoot /home/intranet/public_html ServerName intranet.domain.local ServerAlias intranet.domain </VirtualHost> Navigating to websvr.domain.local serves the pages in /var/www/html/ and navigating to intranet.domain.local serves the pages in /var/www/html/ but it should serve /home/intranet/public_html Would it take a while to resolve? the 1st DNS record was instant. Link to comment Share on other sites More sharing options...
sc302 Veteran Posted January 14, 2015 Veteran Share Posted January 14, 2015 try pinging the second dns entry and see if you get a response. if not do a ipconfig /flushdns and try again. Also check to see what dns server is your primary dns server in your ip properties and then go to that dns server and see if the entry replicated to that server yet. Link to comment Share on other sites More sharing options...
game_over Posted January 16, 2015 Author Share Posted January 16, 2015 try pinging the second dns entry and see if you get a response. if not do a ipconfig /flushdns and try again. Also check to see what dns server is your primary dns server in your ip properties and then go to that dns server and see if the entry replicated to that server yet. I can't even ping the 1st entry, it does a timeout, even the IP address... I can access it through the browser though :-/ Link to comment Share on other sites More sharing options...
+BudMan MVC Posted January 16, 2015 MVC Share Posted January 16, 2015 don't worry if it pings, which I would allow for troubleshooting.. But does it resolve, does ping return the right IP address even if it times out.. Do a nslookup, use dig, etc.. Post your full config if your saying when you go to the 2nd fqdn you get the first - this would point to something in your config not right. Link to comment Share on other sites More sharing options...
game_over Posted January 16, 2015 Author Share Posted January 16, 2015 don't worry if it pings, which I would allow for troubleshooting.. But does it resolve, does ping return the right IP address even if it times out.. Do a nslookup, use dig, etc.. Post your full config if your saying when you go to the 2nd fqdn you get the first - this would point to something in your config not right. Yes it returns the correct IP.. config for what, sorry? Link to comment Share on other sites More sharing options...
sc302 Veteran Posted January 16, 2015 Veteran Share Posted January 16, 2015 by now the dns entries should have replicated across your servers so you should be fine with dns. If you are still having an issue the configs on the web server are not correct. Link to comment Share on other sites More sharing options...
+BudMan MVC Posted January 16, 2015 MVC Share Posted January 16, 2015 lets see your full apache config. I would guess you have something that is over riding your virtual -- and is just using you default. Link to comment Share on other sites More sharing options...
game_over Posted January 19, 2015 Author Share Posted January 19, 2015 lets see your full apache config. I would guess you have something that is over riding your virtual -- and is just using you default. http://pastebin.com/HNLApfYr Thanks Link to comment Share on other sites More sharing options...
Recommended Posts