danep Posted February 12, 2009 Share Posted February 12, 2009 Sorry for the somewhat obscure title, I don't know how to describe this problem succinctly. Basically, I run a "live" and "development" version of my website on my server using name-based virtual hosts, so example.com has DocumentRoot /var/www/live while dev.example.com has DocumentRoot /var/www/dev. I can get to both websites fine from other machines. However, if I use Lynx or Curl on the server to try to get to example.com, I get the directory listing for /var/www instead. Does anybody know why that might be? Let me know if you would like me to post Apache config files. I appreciate the help, this has been driving me absolutely nuts. Link to comment https://forums.phpfreaks.com/topic/144945-can-access-website-externally-but-not-locally/ Share on other sites More sharing options...
danep Posted February 12, 2009 Author Share Posted February 12, 2009 Ah, I think I solved part of it... I was only editing httpd.conf to do virtual hosting. What I didn't realize was that there was a default configuration file loaded in sites-enabled that had a virtual host with DocumentRoot /var/www. I changed this default virtual host DocumentRoot to /var/www/live and the problem is solved. However, I still don't understand why the problem existed in the first place- i.e., why everything worked when browsing from another machine but not when using Lynx from the local machine. Link to comment https://forums.phpfreaks.com/topic/144945-can-access-website-externally-but-not-locally/#findComment-760603 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.