LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-06-2005, 04:39 PM   #1
eckertc1
Member
 
Registered: Feb 2005
Posts: 57

Rep: Reputation: 15
Virtual Host acting funny


hello,

i have done the following:

set up apache 2 server correctly.
added virtual hosts and tested them (they work!!)
added vsftp so i could upload my pages (working great)

then i simply ran through and tested everything one last time and went to bed for the night. the problem is, when i woke up this morning, both mysite1 and mysite2 URLs default to mysite1 page.

how could this change on its own over night. and what could have changed. i checked my httpd.conf file with the back up i made after i had all working and they match perfectly.

here is a look at my httpd.conf. hope someone can help me out with this confusing problem.

### Section 3: Virtual Hosts

NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.mysite1.com
ServerAlias mysite1.com *.mysite1.com
DocumentRoot /var/www/mysite1
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/var/www/mysite1">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
DirectoryIndex index.html
</VirtualHost>

<VirtualHost *:80>
ServerName www.mysite2.com
ServerAlias mysite2.com *.mysite2.com
DocumentRoot /var/www/mysite2
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/var/www/mysite2">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
DirectoryIndex index.html
</VirtualHost>
 
Old 03-06-2005, 05:22 PM   #2
eckertc1
Member
 
Registered: Feb 2005
Posts: 57

Original Poster
Rep: Reputation: 15
bump
 
Old 03-06-2005, 06:20 PM   #3
eckertc1
Member
 
Registered: Feb 2005
Posts: 57

Original Poster
Rep: Reputation: 15
bump 2
 
Old 03-06-2005, 06:30 PM   #4
KimVette
Senior Member
 
Registered: Dec 2004
Location: Lee, NH
Distribution: OpenSUSE, CentOS, RHEL
Posts: 1,794

Rep: Reputation: 46
Just FYI you should not ever bump any thread within 24 hours of the last post. It's bad netiquette not to mention against the rules here. I figured I'd warn you before the mods spank you.

Anyway: Just to cover the basics to make sure you tested properly:

1. Is the DNS external to this box and do both domains resolve correctly?
2. Does your browser support and is it configured for http 1.1 and not http 1.0? (some browsers still allow you to force it to http 1.0 for compatibility testing purposes)
3. Did you restart httpd? (on some distros you run apachectl restart and on others you run /etc/init.d/apache2 restart and yet others require you to run httpd restart in order to reload httpd.conf

Now don't get me wrong; you did state it was working last night but I'm asking these to cover the basics. e.g., if you were testing from an IDE like Quanta or Eclipse, you may have been testing via the filesystem and not via http.

Edit: Also, check for trailing spaces, and be sure the file is saved as raw ASCII if you used a richtext-capable editor. In GUI environments, especially OS/X for example, saving config files as richtext or unicode is a common user error. Everything "looks" OK until you view it with a tool like cat, pico, or vi.

Last edited by KimVette; 03-06-2005 at 06:37 PM.
 
Old 03-06-2005, 06:41 PM   #5
eckertc1
Member
 
Registered: Feb 2005
Posts: 57

Original Poster
Rep: Reputation: 15
thank you for the reply, and the warning about bumps, i did not realize that was a no no. ill try suggestions you offered and see if that helps out.
 
  


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
Yast acting funny DFA SUSE / openSUSE 2 05-23-2005 04:33 PM
sound acting funny madmax04 Fedora 6 10-19-2004 10:20 PM
Gnome acting very funny Stan the caddy Linux - Software 6 09-18-2004 02:57 PM
Mouse acting funny after upgrade to 2.6.8.1 Cosmos95 Slackware 8 08-28-2004 08:36 AM
Directory permissions acting funny... ifm Linux - Newbie 1 06-11-2002 03:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:08 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration