LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-04-2004, 01:19 PM   #1
dimc
LQ Newbie
 
Registered: Oct 2004
Posts: 4

Rep: Reputation: 0
this is verrrrrrrry weird


Iīve been trying for about 2 weeks setup a web server to host websites.

Iīm using:
fedora 2 + apache 2.0.51 + BIND 9.2.4

But i think the problem is with apache.

When i setup some virtual hosts like this:

Code:
Listen 80
NameVirtualHost 192.168.2.55

<VirtualHost 192.168.2.55>
    ServerName tec.com
    DocumentRoot "/var/www/html/"
    <Directory /home/tec/public_html>
	Options Indexes IncludesNOEXEC FollowSymLinks
    </Directory>
</VirtualHost>

<VirtualHost 192.168.2.55>
    DocumentRoot "/home/bur/public_html/"
    ServerName bur.com
    <Directory "/home/bur/public_html/">
	allow from all
	Options +Indexes
    </Directory>
</VirtualHost>
and go to bur.com it opens e 1st one (tec.com), isnīt this strange??

I even thought it was a 2.0.49 bug, but it doesnīt look like

Help me please, please..........I tried with no success RTFM and some examples on the web.

BINS seams to work fine, i even tested it in ww.dnsreport.com

[root@ns conf]# nslookup
> set q=any
> tec.com
Server: 192.168.2.55
Address: 192.168.2.55#53

tec.com mail exchanger = 1 mail.tec.com.
tec.com text = "v=spf1 mx ptr ~all"
tec.com
origin = ns.moz.com
mail addr = root.tec.com
serial = 2004100200
refresh = 7200
retry = 3600
expire = 604800
minimum = 38400
tec.com nameserver = ns.moz.com.
Name: tec.com
Address: 196.46.2.xx

note that my machine is behind a router and requests to 196.46.2.xx in ports 22, 80, 53 are forwarded to 192.168.2.55

[root@ns root]# httpd -S
VirtualHost configuration:
196.46.2.xx:80 is a NameVirtualHost
default server mo.co.mz (/etc/httpd/conf/httpd.conf:1034)
port 80 namevhost mo.co.mz (/etc/httpd/conf/httpd.conf:1034)
port 80 namevhost tec.com (/etc/httpd/conf/httpd.conf:1042)
port 80 namevhost bur.com (/etc/httpd/conf/httpd.conf:1053)
Syntax OK




Thanks for any help again


Last edited by dimc; 10-04-2004 at 03:25 PM.
 
Old 10-04-2004, 01:57 PM   #2
otisthegbs
Member
 
Registered: May 2003
Location: Vancouver
Distribution: RH9
Posts: 100

Rep: Reputation: 15
Well if its a direct cut and paste your second VirtualHost tag has a typo

<VirtualHost 196<--.168.2.55>

as grama always used to say 'dont forget to diff your shit'

Last edited by otisthegbs; 10-04-2004 at 01:58 PM.
 
Old 10-04-2004, 02:18 PM   #3
dimc
LQ Newbie
 
Registered: Oct 2004
Posts: 4

Original Poster
Rep: Reputation: 0
no man thatīs not the problem

itīs not copy & paste

any other help please??

Last edited by dimc; 10-04-2004 at 02:22 PM.
 
Old 10-07-2004, 12:39 PM   #4
otisthegbs
Member
 
Registered: May 2003
Location: Vancouver
Distribution: RH9
Posts: 100

Rep: Reputation: 15
do this then, put in each virtual host entry,
ErrorLog logs/tld.com-error-log
CustomLog logs/tld.com-custom-log

and see what they document after you restart httpd and access the two pages.
 
Old 10-07-2004, 03:00 PM   #5
h4x0r
LQ Newbie
 
Registered: Sep 2004
Location: AZ
Distribution: Mandrake / FreeBSD
Posts: 9

Rep: Reputation: 0
same problem here...

I'm having the same problem. I just don't get it, it only accesses the first virtual host. I checked the acces_log and it shows what site I'm requesting, but it gives the images and everything else from the wrong site. Take a look at my conf files and tell me if you can figure out what I'm doing wrong.

vhosts/Vhosts.conf
commonhttpd.conf
httpd2.conf
httpd.conf
 
Old 11-07-2004, 03:58 PM   #6
QtCoder
Member
 
Registered: Aug 2003
Location: USA
Distribution: Slackware 12.0 RC1
Posts: 129

Rep: Reputation: 15
Ok, I'm having exactly the same problem as h4x0r. My setup is just like that, except with only one vhost. No matter what I do, the server defaults to the first virtual host. Even if I use the IP directly or the name of the primary server, I still get directed to the first virtual host.

It seemed like a DNS issue at first, but when I VNC'd into my server and accessed localhost from the browser, I got my first virtual host!!

I'm going to watch this thread and hopefully get an answer. If I learn anything, I'll let everyone know.
 
  


Reply



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
Strange Apache Webserver Behavior AMarchini Linux - Networking 3 04-28-2005 10:49 AM
Very Strange Behavior raysr Mandriva 4 08-31-2004 02:06 PM
Strange Script Behavior Stranger Linux - General 0 02-18-2004 03:30 AM
Strange Behavior andrewb758 Linux - Hardware 5 08-31-2003 02:42 PM
strange behavior abhijit Linux - General 3 07-09-2003 11:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:41 PM.

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
Open Source Consulting | Domain Registration