httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted <...@KI5U.net>
Subject Re: [users@httpd] Only the first vhost defined comes up
Date Mon, 19 Jan 2004 17:12:13 GMT
Jeff,

I think you should go buy yourself a cable-modem router of some sort.  It 
provides excellent firewall protection and allows only what you want into 
the machine.  My favorites are the Zyxel products 
(http://www.zyxel.com/index.php) which are top-rated, but there are 
hundreds to choose from.  I use the Zywall 10 in front of a switch to route 
to my various machines, and I've never detected a single hit inside the 
firewall.  If you only have one machine, you don't need a switch.  Using 
it, I turn the RedHat firewall off.  LinkSys is OK, but I've had problems 
trying to serve behind one, and I don't recommend them (but they may be 
improved).  The guys at Zycell "get it".  The folks at LinkSys start with 
"turn the router off, then hold down the reset button when you plug in the 
power...).

As you don't have a hardware firewall, you must be using the Linux RedHat 
firewall.  Perhaps someone else on this forum can help you with setup.  It 
could be that the built-in firewall is blocking requests.

It wouldn't hurt to add the following to your /etc/hosts file

66.31.37.63      theimages.org
66.31.37.63     sk.theimages.org
66.31.37.63      jd.theimages.org

RedHat has a utility called tcpdump.  You can run it to see if requests are 
being forwarded to your machine.  Navigate to it's folder using Konsole and 
run it.

It could be that your domain forwarder is not sending requests for 
sk.theimages.org and jd.theimages.org to your machine.  If you can 
configure sub-domains, set them to your address:port, using the unique port 
address for each sub-domain.  I think you need to use "Masked forwarding".

By the way, I tried many variations of virtual hosting and decided that 
IP:port was the simplest.  Name-based requires running a DNS (which I was 
never able to get to work).

Stick with it.  It took me a while but I now have all my virtual hosts running.

Ted

At 11:31 AM 1/19/2004 -0500, you wrote:

>Thanks for the responses Ted.
>
>I changed the Listen directives without success, the only local address
>this box has is 127.0.0.1 and pointing everythig at that would killed all
>hosts.  could i ask how i could check the NAT tables?  it does seem that it
>is not really apache, maybe Linux only allowing two ports out.  I'm not
>behind a firewall, i am on a cable connection...
>
>a piece of additional info....If the first virtual host is the same as the
>main server, only that one will respond, but if the main server and the
>first virtual are different, both will respond.  which makes sense....but
>seems odd that two will come up, but not three, or four.
>
>and about your other mail
>/usr/local/apache2/bin/httpd -t -D DUMP_VHOSTS
>replies Syntax OK
>
>and the -S switch shown below says apache thinks those hosts are available,
>i think....
>
>If i run /usr/local/apache2/bin/httpd -S.  Apache reports all the
> > >virtuals
> > > > as defined in httpd.conf
> > > > 66.31.37.63:8080       theimages.org
> > > > (/usr/local/apache2/conf/httpd.conf:1056)
> > > > 66.31.37.63:8085       sk.theimages.org
> > > > (/usr/local/apache2/conf/httpd.conf:1063)
> > > > 66.31.37.63:8090       jd.theimages.org
> > > > (/usr/local/apache2/conf/httpd.conf:1071)
>Thanks
>Jeff
>
>
> 
>
>                       Ted 
 >
>                       <ted@KI5U.net>           To: 
> users@httpd.apache.org
>                                                cc: 
 >
>                       01/19/2004 11:01         Subject:  Re: 
> [users@httpd] Only the first vhost defined comes up
>                       AM 
 >
>                       Please respond 
> to 
>
>                       users 
 >
> 
>
> 
>
>
>
>
>
>Jeff,
>
>I'm doing the same exact thing and it's working.  The only differences I
>see are:
>
>I'm using the full IP:Port for the listen directives, and I point them at
>the internal IP address rather than the outside IP
>MY NameVirtualHost. directives also use the internal IP rather than the
>outside IP.
>Perhaps your firewall or NAT tables are not passing the other ports.
>I'm putting the directory stuff inside the virtual definitions (but it
>shouldn't matter)
>
>You're getting the "default" page, which is supposed to happen when Apache
>can't resolve the different virtual hosts.
>
>Ted
>
>At 10:43 AM 1/19/2004 -0500, you wrote:
>
>
>
> > >It looks to me like you're getting to the same place because you have
>the
> > >same document root for all three.
> > >
> > >Ted
> >
> >The folder names are short (jd and sk) but they are there.
> >DocumentRoot /www/dev/htdocs
> >DocumentRoot /www/dev/sk/htdocs
> >DocumentRoot /www/dev/jd/htdocs
> >
> >to clarify, the first host comes up and works fine.  the second two return
> >Page Not Found, typical browser message, apache is not reached.
> >
> >Thanks
> >Jeff
> >
> > >At 09:29 AM 1/19/2004 -0500, you wrote:
> >
> >
> >
> >
> > > >-----BEGIN PGP SIGNED MESSAGE-----
> > > >Hash: SHA1
> > >
> > > >I think you should add this at the beginning of your virtuals:
> > >
> > > >NameVirtualHost 66.31.37.63:8080
> > > >NameVirtualHost 66.31.37.63:8085
> > > >NameVirtualHost 66.31.37.63:8090
> > >
> > >       Same problem with these added before the virtual definitions.
> > >
> > >       Thanks
> > >       Jeff
> > >
> > > >- --
> > > >Miroslav ?ulc, CEO
> > > >StartNet s.r.o.
> > > >- ----------------------------------------
> > > >ICQ: 60144073
> > > >web: http://www.startnet.cz/
> > > >- ----------------------------------------
> > > >mobil: +420 603 711 413
> > > >telefon: +420 257 225 602
> > > >fax: +420 257 225 592
> > > >- ----------------------------------------
> > >
> > >On Monday 19 of January 2004 15:16, jeffrey_n_Dyke@Keane.com wrote:
> > > > I'm running RH8 on i386 with Apache 2.0.48/PHP4.3.4. I've tried
>mutiple
> > > > ways of configuring my virutual hosts, both Name based and IP
> > > > based/changing port numbers/adding-subtracting # of virtuals and the
> > > > reccuring theme is that only the first one will start and respond to
>a
> > > > webbrowser when i run ./httpd -k restart or (stop then start).  If i
> > >change
> > > > the order, then the host defined first will start, but the other two
> >will
> > > > not.  This server does not Listen at all on Port 80.  Nothing is
>logged
> > >in
> > > > any defined log file and starting with -e debug, gives no further
> >hints.
> > > >
> > > > I've set up about 30 Apaches in the past and NEVER had a problem with
> > > > virtuals.  The same thing was happing to me on 1.3.29
> > > >
> > > > If i run /usr/local/apache2/bin/httpd -S.  Apache reports all the
> > >virtuals
> > > > as defined in httpd.conf
> > > > 66.31.37.63:8080       theimages.org
> > > > (/usr/local/apache2/conf/httpd.conf:1056)
> > > > 66.31.37.63:8085       sk.theimages.org
> > > > (/usr/local/apache2/conf/httpd.conf:1063)
> > > > 66.31.37.63:8090       jd.theimages.org
> > > > (/usr/local/apache2/conf/httpd.conf:1071)
> > > >
> > > >
> > > > Listen 8080
> > > > Listen 8085
> > > > Listen 8090
> > > >
> > > >
> > > > Here is the vhost definitions that go along with this.
> > > >
> > > > <VirtualHost 66.31.37.63:8080>
> > > >     ServerAdmin user@mailbox.domain
> > > >     DocumentRoot /www/dev/htdocs
> > > >     ServerName theimages.org
> > > >     ErrorLog /www/dev/logs/error_log
> > > >     CustomLog /www/dev/logs/access_log combined
> > > > </VirtualHost>
> > > > <VirtualHost 66.31.37.63:8085>
> > > >     ServerAdmin user@mailbox.domain
> > > >     DocumentRoot /www/dev/sk/htdocs
> > > >     ServerName sk.theimages.org
> > > >     ErrorLog /www/dev/sk/logs/error_log
> > > >     CustomLog /www/dev/sk/logs/access_log combined
> > > > </VirtualHost>
> > > >
> > > > <VirtualHost 66.31.37.63:8090>
> > > >     ServerAdmin user@mailbox.domain
> > > >     DocumentRoot /www/dev/jd/htdocs
> > > >     ServerName jd.theimages.org
> > > >     ErrorLog /www/dev/jd/logs/error_log
> > > >     CustomLog /www/dev/jd/logs/access_log combined
> > > > </VirtualHost>
> > > >
> > > > Any assistance is greatly appreciated.
> > > > JEff
> > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > The official User-To-User support forum of the Apache HTTP Server
> > >Project.
> > > > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > > >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > > > For additional commands, e-mail: users-help@httpd.apache.org
> > >-----BEGIN PGP SIGNATURE-----
> > >Version: GnuPG v1.2.3 (GNU/Linux)
> > >
> > >iD8DBQFAC+gnikB+ev/lHawRAh6AAJ4xarP0RnW/rmYRCacCCkbkMl14VACgiR5e
> > >8RH60QGbp54cvvhyf35Pxek==tPC5
> > >-----END PGP SIGNATURE-----
> > >
> > >
> > >---------------------------------------------------------------------
> > >The official User-To-User support forum of the Apache HTTP Server
>Project.
> > >See <URL:http://httpd.apache.org/userslist.html> for more info.
> > >To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > >For additional commands, e-mail: users-help@httpd.apache.org
> > >
> > >
> > >
> > >
> > >
> > >
> > >---------------------------------------------------------------------
> > >The official User-To-User support forum of the Apache HTTP Server
>Project.
> > >See <URL:http://httpd.apache.org/userslist.html> for more info.
> > >To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > >For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
> >---------------------------------------------------------------------
> >The official User-To-User support forum of the Apache HTTP Server Project.
> >See <URL:http://httpd.apache.org/userslist.html> for more info.
> >To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> >For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
> >
> >
> >
> >
> >---------------------------------------------------------------------
> >The official User-To-User support forum of the Apache HTTP Server Project.
> >See <URL:http://httpd.apache.org/userslist.html> for more info.
> >To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> >For additional commands, e-mail: users-help@httpd.apache.org
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>
>
>
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message