?
Solved

virtual host superceding main site problem

Posted on 2005-04-04
3
Medium Priority
?
151 Views
Last Modified: 2010-03-04
Hi there.

I'm running redhat linux, with apache 2.0.50.

I'm trying to create a virtual host with the configuration:

NameVirtualHost xxx.xxx.xxx.xxx:80

<VirtualHost xxx.xxx.xxx.xxx:80>
ServerAdmin webadmin@mydomain.com
ServerName www.mydomain.com
DocumentRoot /var/www/mydomain/
ErrorLog logs/mydomain.com-error_log
</VirtualHost>


To me, this seems fine but when I restart apache, this virtual host becomes the _main_ website, wiping out the previous configuration directive in httpd.conf:
DocumentRoot "/var/www/html"

<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</directory>

etc etc.

any ideas what the heck is going on please?

Thanks

Daryn
0
Comment
Question by:daryn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 15

Accepted Solution

by:
periwinkle earned 1000 total points
ID: 13700836
Daryn -

If you are using virtual hosts and have multiple entries that match, the first matching site is delivered.  Create a default virtualhost (and list it first) that is your main site.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 13701952
please post the url you used to connect
0
 

Author Comment

by:daryn
ID: 13706766
sorted. no default virtual domain for the site. silly mistake but i thought there was already a default built into the basic httpd.conf file.

-shrugs helplessly-

ta all
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question