Re: Tux virtual_server cannot pass trough to Apache VirtualHost...

"BuildPage, Inc." <[email protected]>
Newsgroups gmane.network.tux
Message-ID <3EC5765F.000001.01112@futures>
Your tux configuration is correct.
However instead of using virtualhost in the httpd.conf 
simply comment out the DocumentRoot direvative and any virtualhost syntax
In the apache configuration httpd.conf add the following line

VirtualDocumentRoot    /var/www/whatever/%0+

this line makes apache recognize any folder created inside /var/www/whatever

as a domain. This using the same mass hosting that tux uses. Remember to
create
symbolic links between domain.com and www.domain.com
 
-------Original Message-------
 
From: [email protected]
Date: Friday, May 16, 2003 03:07:45 PM
To: [email protected]
Subject: Re: Tux virtual_server cannot pass trough to Apache VirtualHost...
 
Hello!
 
I use the following options - on a testing server:
 
virtual_server = 1
strip_host_tail = 1
 
in httpd.conf is:
 
RewriteEngine On
RewriteCond %{HTTP_HOST} ^[^.]+$
RewriteRule ^([.*]+)/(.*) /var/www/$1/$2
 
I used BindAddress 127.0.0.1, and not NameVirtualHost.
 
Because tux strips the "www." from the domain, I just have
to worry about the "domain.com". We will store domains in
"/var/www/domain.com" style.
I tested the above settings, but not sure, if I did not
change them badly since that. Let me know, if it's working or not.
 
Another tip, which took me a while figure out =) is, that
you can use symlinks to serve secondary domains:
 
To make "subdomain.domain.com" avaiable, you just have to symlink
"/var/www/domain.com/subdomain" to "/var/www/subdomain.domain.com".
That way, you can use one ftp account for a domain, and your docroot
could look more organized.
 
With the above Apache settings, you do not have to edit httpd.conf
if you want to add a new domain every time. Just create the directories
under your docroot.
 
Even is logging is not suggested on a high traffic server, enable
it until you are ready with the setup.
 
Regards,
Balazs Kinszler
 
 
On 16 May 2003 17:00:03 -0400
Chris Davies <[email protected]> wrote:
 
> On Fri, 2003-05-16 at 14:13, Scott Switzer wrote:
> > Chris,
> > 
> > Thanks for the message - I tried, and it still does not work. Here are
> > the relevant pieces of my setup:
> > 
> > TUX:
> > Listening on 0.0.0.0:80 (this is the default)
> > client_ip = 8080 (this is the default)
> clientport ???
> 
> > virtual_server set to 1 (this makes a request to
> > http://www.site.com/page.php map to /var/www/html/site.com/page.php)
> > In /etc/tux.mime.types, the parameter TUX/redirect is mapped to php.
> > 
> > APACHE:
> > NameVirtualHost 127.0.0.1:8080
> > A sample vhost is:
> > 
> > <VirtualHost 127.0.0.1:8080>
> > ServerName www.site.com
> > ServerAdmin [email protected]
> > DocumentRoot /var/www/html/site.com
> > ErrorLog logs/site.com-error_log
> > TransferLog /dev/null
> > </VirtualHost>
> 
> just for kicks, put:
> 
> ServerAlias site.com in your virtual config
> 
> I don't recall if tux strips off the www. when it sends the request or
> not.
> 
> 
> -- 
> Chris Davies
> E-Commerce/Colocation http://daviesinc.com/
> +1.561.333.6946
> Florida, USA
> 
> 
> _______________________________________________
> tux-list mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/tux-list
> 
 
 
_______________________________________________
tux-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/tux-list
.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.