You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Scott Hood <sc...@solucentrix.com> on 2002/02/18 21:25:55 UTC

Virtial Hosting

I have 2 domains setup with dyndns.org.  Current to domian 1 is going to port 
8080 and domain2 is going to port 8081.  I am running a linux firewall using 
ipchains.  Port 8080 is fowarded to my webserver at port 80 and port 8081 is 
foward as port 8081 to the webserver.  My virtual hosts looks like this for my 
troubled website.  I sent the second domain to 8081 because i could not get the 
virtual hosting to work to start with.

<VirtualHost _default_:8081 >
    ServerAdmin webmaster@elitegamerz.org
    DocumentRoot /var/www/html/games
    ServerName web.elitegamez.org:8081

<Directory /var/www/html/games>
      Options Indexes
      Allow From All
    </Directory>

</VirtualHost>

<VirtualHost mail.elitegamerz.org >
    ServerAdmin webmaster@elitegamerz.org
    DocumentRoot /var/www/html/tn
    ServerName mail.elitegamez.org

<Directory /var/www/html/tn>
      Options Indexes
      Allow From All
    </Directory>

</VirtualHost>

Now if i got to any address on port 8081 i get the _default profile.  If i got 
to mail.elitegamerz.org I get the default profile.  If I remove the _default i 
get my server deafult for every site i try to hit on mer server no matter what 
port.  Is it possible to do what i want to do?  I want all the sites working on 
1 port and be able to virtual something.domain.com.  Can any one aid with some 
advice?

Thanks

Scott

---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Re: Virtial Hosting

Posted by Owen Boyle <ob...@bourse.ch>.
Scott Hood wrote:
> 
> I have 2 domains setup with dyndns.org.  Current to domian 1 is going to port
> 8080 and domain2 is going to port 8081.  I am running a linux firewall using
> ipchains.  Port 8080 is fowarded to my webserver at port 80 and port 8081 is
> foward as port 8081 to the webserver.  My virtual hosts looks like this for my
> troubled website.  I sent the second domain to 8081 because i could not get the
> virtual hosting to work to start with.
> 

There's nothing obviously wrong with this - I'm more concerned by the
forwarding rules in your FW - it's easy to screw these up...

What's wrong with Name-based VHing? Why not try:

NameVirtualHost ip-addr
Listen ip-addr
 <VirtualHost ip-addr>
   DocumentRoot /var/www/html/games
   ServerName web.elitegamez.org
   ...
</VirtualHost>

<VirtualHost ip-addr>
  DocumentRoot /var/www/html/tn
  ServerName mail.elitegamez.org
  ...
</VirtualHost>

where ip-addr = the IP address that web.elitegamez.org and
mail.elitegamez.org resolve to.

Then you can server both sites from port 80 and your FW configuration
will be much simpler.

Rgds,

Owen Boyle.

---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Re: Virtial Hosting

Posted by RuneImp <ru...@imptech.net>.
Try this instead:

<VirtualHost *>
    ServerAdmin webmaster@elitegamerz.org
    DocumentRoot /var/www/html/games
    ServerName web.elitegamez.org:8081
<Directory /var/www/html/games>
      Options Indexes
      Allow From All
</Directory>
</VirtualHost>

<VirtualHost *>
    ServerAdmin webmaster@elitegamerz.org
    DocumentRoot /var/www/html/tn
    ServerName mail.elitegamez.org
<Directory /var/www/html/tn>
      Options Indexes
      Allow From All
</Directory>
</VirtualHost>


-=- RuneImp
ImpTech - Web Design, Hosting & Computer Tech
http://imptech.net
rune@imptech.net


----- Original Message -----
From: "Scott Hood" <sc...@solucentrix.com>
To: <us...@httpd.apache.org>
Sent: Monday, February 18, 2002 12:25 PM
Subject: Virtial Hosting


I have 2 domains setup with dyndns.org.  Current to domian 1 is going to port
8080 and domain2 is going to port 8081.  I am running a linux firewall using
ipchains.  Port 8080 is fowarded to my webserver at port 80 and port 8081 is
foward as port 8081 to the webserver.  My virtual hosts looks like this for my
troubled website.  I sent the second domain to 8081 because i could not get the
virtual hosting to work to start with.

<VirtualHost _default_:8081 >
    ServerAdmin webmaster@elitegamerz.org
    DocumentRoot /var/www/html/games
    ServerName web.elitegamez.org:8081

<Directory /var/www/html/games>
      Options Indexes
      Allow From All
    </Directory>

</VirtualHost>

<VirtualHost mail.elitegamerz.org >
    ServerAdmin webmaster@elitegamerz.org
    DocumentRoot /var/www/html/tn
    ServerName mail.elitegamez.org

<Directory /var/www/html/tn>
      Options Indexes
      Allow From All
    </Directory>

</VirtualHost>

Now if i got to any address on port 8081 i get the _default profile.  If i got
to mail.elitegamerz.org I get the default profile.  If I remove the _default i
get my server deafult for every site i try to hit on mer server no matter what
port.  Is it possible to do what i want to do?  I want all the sites working on
1 port and be able to virtual something.domain.com.  Can any one aid with some
advice?

Thanks

Scott

---------------------------------------------------------------------
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
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
For additional commands, e-mail: users-help@httpd.apache.org