LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 11-06-2004, 03:55 PM   #1
QtCoder
Member
 
Registered: Aug 2003
Location: USA
Distribution: Slackware 12.0 RC1
Posts: 129

Rep: Reputation: 15
Apache 2: won't allow document root to be changed, plus more


Hi.

Alright, first a little background on the issue. I am learning to set up my server to host virtual sites. Right now, I've only got two, to keep it simple. I decided to try something I picked up from an Apache book. It recommended to create three folders in each document root called production, development, and staging and to create a port-based virtual host for each folder so they could be worked on independently of each other. For example, the production folder was the primary folder so it didn't have a vhost config. I gave the development folder a vhost for port 8989, just to see if it would work. It did, of course. However, once I got around to putting in a vhost configuration for another site, Apache complained (in /var/log/messages):

Code:
Nov  6 11:17:22 sunshine-market httpd2: [Sat Nov 06 11:17:22 2004] [error] VirtualHost 16
8.103.142.125:8989 -- mixing * ports and non-* ports with a NameVirtualHost address is no
t supported, proceeding with undefined results
My vhost.conf file was set up as follows:

Code:
# port-based vhost for the development folder (primary site)
<VirtualHost 168.103.142.125:8989>
  ServerName sunshine-market.com
  DocumentRoot /var/www/html/www.sunshine-market.com/development
 ...
</VirtualHost>

# name-based vhost for bluewillowherbs.biz site (secondary site)
NameVirtualHost 168.103.142.125
<VirtualHost 168.103.142.125>
  ServerName bluewillowherbs.biz
  DocumentRoot /var/www/html/www.bluewillowherbs.biz
  ...
</VirtualHost>
My httpd2.conf file had it's document root set to /var/www/html/www.sunshine-market.com/production

Now that I think about it, would it not work to put 168.103.142.125:80 for my second VirtualHost container?

Anyway, back to my main issue! I decided to scrap that development/production stuff for the moment, so I removed my port-based vhost, told Apache to stop listening on port 8989, and changed my directory structure back to /var/www/html/www.sunshine-market.com without any dev/production folders.

I restarted Apache with apachectl restart. But when I looked at /var/log/messages, it said this:

Code:
Nov  6 14:23:44 sunshine-market httpd2: Warning: DocumentRoot [/var/www/html/www.sunshine-market.com/production] does not exist
It still starts up just fine, but I can't figure out why in the world it's still looking for that production folder. I've removed all references to it from all apache conf files that I know of. What's more, I can't even test my configuration because the DNS server at my ISP has been misconfigured. It's re-directing sunshine-market.com to bluewillowherbs.biz, which is my main vhost.

Besides that, can anyone explain the production folder issue?

Thanks
 
Old 11-06-2004, 04:44 PM   #2
QtCoder
Member
 
Registered: Aug 2003
Location: USA
Distribution: Slackware 12.0 RC1
Posts: 129

Original Poster
Rep: Reputation: 15


Argh, I found 41_mod_ssl.defalut-vhost.conf. That's where it was looking for that elusive production folder.

That was a long post for nothing... :-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache - change document root? squall14716 Linux - Software 2 01-20-2010 10:16 AM
Changing document root in Apache on OpenBSD 3.8 klemen *BSD 2 09-23-2005 02:56 AM
Apache 403 when changin document root. webgovernor Linux - Newbie 3 04-20-2005 12:54 AM
Document Root in Apache Hal Linux - Newbie 2 10-28-2003 06:10 AM
Apache Document Root Path bowen Linux - General 8 11-29-2002 02:13 AM


All times are GMT -5. The time now is 10:28 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration