Apache 2 Virtual Hosts not resolving


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Apache 2 Virtual Hosts not resolving
# 1  
Old 08-19-2004
Apache 2 Virtual Hosts not resolving

Hey all,

I'm having some apache problems. I've installed apache countless times on FreeBSD. However, I'm having some problems and I could use some help. Here is my system info:

FreeBSD 5.2.1
Apache 2.0.51 (/usr/local/apache2), doc root (/www symlink to /var/www)
PHP 5.0.1 (/usr/local/php)
MySQL 4.1.3 (/usr/local/mysql)
AMD 1.5Ghz/512MB

I am using a DNS hosting provider to point serveral domains to my IP address. From there my router passes all port 80 requests to my web/email server. Once to my server, Apache uses the Virtual Host to forward to the right site directory.

Well my domains to get to my site, however apache isn't routing the domain requests to the right folders; my default domain is showing up. Here are a few lines from my httpd.conf file i thought might be useful for your help:

ServerRoot "/usr/local/apache2"
Listen 192.168.77.3:80
ServerName www.ezekiel61-domain.com:80
DocumentRoot "/www"

NameVirtualHost *:80
# ezekiel61-domain.com
<VirtualHost *>
DocumentRoot /www/ezekiel61-domain.com
ServerName ezekiel61-domain.com
ErrorLog logs/ezekiel61-domain.com-error_log
CustomLog logs/ezekiel61-domain.com-access_log common
</VirtualHost>
# bar.ezekiel61-domain.com
<VirtualHost *>
DocumentRoot /www/bar.ezekiel61-domain.com
ServerName bar.ezekiel61-domain.com
</VirtualHost>
# badonkadonk.org
<VirtualHost *>
ServerName butt.badonkadonk.org
DocumentRoot /www/butt.badonkadonk.org
</VirtualHost>

all these directories exists, but for some reason only my primary domain shows up. So if I goto www.ezekiel61-domain.com, I do see its homepage. If I goto butt.badonkadonk.org I see www.ezekiel61-domain.com.

Any suggestions? Thanks in advance!!!

E
# 2  
Old 08-20-2004
Problems can arise from the client not sending the required information for name-based virtual hosts, this results in the server sending back the first virtual host listed.

Happens mostly with older browsers.
# 3  
Old 08-20-2004
Well this happens from every computer I've tried to access the sites from.

For instance 4 of my test case computers are running IE 6+ and Mozilla Firefox 0.9.3. Any other suggestions?

Thanks.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Use of /etc/hosts files in resolving the dns name

Hello, For what purpose /etc/hosts file is used.I mean how any request coming to a DNS server or a switch would know that which name and ip are configured in /etc/hosts files of a server? Best regards, Vishal (3 Replies)
Discussion started by: admin_db
3 Replies

2. IP Networking

Newbie BIND DNS question: resolving upstream hosts?

Old skool UNIX and Linux geek here, but newbie to the world of DNS and bind. I've recently been tasked with replacing our DNS infrastructure, currently on Windows, with a RHEL based solution. And I assume that means using bind, which I've not used before. Here's my question: Suppose our company... (3 Replies)
Discussion started by: lupin..the..3rd
3 Replies

3. Web Development

Apache Virtual Path

Say there is a certain path I wish to always load the same page. So if they go to somesite.com/a/b/c, it always goes to myscript.php and fed a/b/c as a server variable. I'm fairly sure this is possible but cannot remember the term it's called, and so cannot find it in web searches or... (7 Replies)
Discussion started by: Corona688
7 Replies

4. Red Hat

apache httpd virtual hosts setup keep hitting the same VirtualHost

I'm trying to set up two virtual hosts. Here's my httpd config: <Directory /Users/userX/dev/sandbox-2> Order deny,allow deny from All Allow from localhost </Directory> NameVirtualHost 127.0.0.1 <VirtualHost 127.0.0.1> DocumentRoot "/Users/userX/dev/sandbox-2" ... (0 Replies)
Discussion started by: GlideK
0 Replies

5. UNIX for Dummies Questions & Answers

Maximum Number of Virtual Hosts per Apache instance

Is there a directive to limit the number of virtual hosts allowed per apache instance? I am told yes but I cannot find it. (1 Reply)
Discussion started by: mojoman
1 Replies

6. Linux

Problems with log rotate and virtual hosts

ok guys, Im running Centos 4.6 Final latest versions of apache, mysql etc etc Basically, I have several websites on there and one of them is a busy forum and it generates big log files in not that long of a timeperiod. I set it up about 8 months ago so that logrotate was rotating the logs... (7 Replies)
Discussion started by: anderow
7 Replies

7. UNIX for Advanced & Expert Users

Virtual Hosts and Alteon DNS conflicts

Hi, This is more of a verification rather than a question of technical nature. This is based on solaris 10 machine Could we use Virtual hosts (within our hosts file): 123.1.1.10 virtual_host_name 123.1.1.10 host_A (note: 123.1.1.10 - host_A is also in our DNS server entry) And... (0 Replies)
Discussion started by: jackola
0 Replies

8. UNIX for Dummies Questions & Answers

Application & Virtual hosts in Apache

Folks; I need help knowing how to add an application to existing Virtual host on Apache. here's the details: I have a virtual host file (Based on IP address) for Apache and is configured to run application inside it. How can i add another application to the same virtual host based on the same IP... (0 Replies)
Discussion started by: moe2266
0 Replies

9. UNIX for Advanced & Expert Users

Resolving Aliases and Virtual IP's on a Host

I am currently going through the servers in our network and trying to compile a list of the current aliases for each box and any virtual IP addresses. I can check for the ones that are supposed to be there but how do I list the ones that I don't even know exist? ANY help would be greatly... (1 Reply)
Discussion started by: Scott Pullen
1 Replies

10. UNIX for Dummies Questions & Answers

Apache virtual host

Would this be the correct entry for Apache to answer on the IP 129.250.242.126 if the servers IP is 129.250.242.125? Are any other changes necessary to get Apache to answer this IP for web traffic? < VirtualHost 129.250.242.126> ServerName www.my_domain.com ServerAdmin admin@my_domain.com... (4 Replies)
Discussion started by: 98_1LE
4 Replies
Login or Register to Ask a Question