Jump to content

Recommended Posts

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.

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.