Re: Virtual hosting problem

2006-10-26 Thread nicolas

Laser144 escribió:

Hi,

On my server (Sarge with Apache2) I am trying to host multiple
websites.
The www.sailmaster.nl and webmail.sailmaster.nl work fine, but
nubicula.xs4all.nl connects to /var/www/apache-default/ and
www.gijpstuiver.nl cannot be reached.

How can I fix this? My /etc/apache2/sites-available/default is printed
below.

Regards,

Andy



NameVirtualHost *:443
NameVirtualHost *:80


ServerName nubicula.xs4all.nl
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /var/www/html/

Options FollowSymLinks
AllowOverride None


Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
RedirectMatch ^/$ /apache2-default/


ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all


ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined
ServerSignature On

Alias /doc/ "/usr/share/doc/"

Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128





ServerName www.sailmaster.nl
ServerAlias sailmaster.nl *.sailmaster.nl
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /var/www/html/



ServerName www.gijpstuiver.nl
ServerAlias gijpstuiver.nl *.gijpstuiver.nl
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /var/www/blogs/



ServerName webmail.sailmaster.nl
ServerAdmin [EMAIL PROTECTED]

DocumentRoot /var/www/html/webmail
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined

SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.pem



  

what you have in your bind configuration?
__
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




RE: Virtual hosting problem

2006-10-26 Thread Jente Paredis
Hi Andy

Forgive me if I say something not relevant; I'm fairly new to Debian. But
since I have my own server with 50 domains hosted on it, I hope I can give
some helpful tips.

Since you are using debian, why don't you use a2ensite / a2dissite? The
principle of this technique is as follows:

Per website you want to host you make a config file in
/etc/apache2/sites-available/. This could look like this (very simple
example)



ServerName nubicula.xs4all.nl
DocumentRoot /path/to/webfiles/of/site


You may want to extend this file with other directives. Save it as
nubilcula.xs4all.nl in sites-available. Now use a2ensite nibula.xs4all.nl to
enable the website. All you need to do now is reload apache with the
command:

/etc/init.d/apache2 reload 

In order to make the changes work. I very much like this automated way of
enabling and disabling websites. For me it's also much easier to manage if I
have a separate file per domain.

Regards

Jente Paredis

 

-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Laser144
Verzonden: donderdag 26 oktober 2006 10:28
Aan: debian-user@lists.debian.org
Onderwerp: Virtual hosting problem

Hi,

On my server (Sarge with Apache2) I am trying to host multiple
websites.
The www.sailmaster.nl and webmail.sailmaster.nl work fine, but
nubicula.xs4all.nl connects to /var/www/apache-default/ and
www.gijpstuiver.nl cannot be reached.

How can I fix this? My /etc/apache2/sites-available/default is printed
below.

Regards,

Andy



NameVirtualHost *:443
NameVirtualHost *:80


ServerName nubicula.xs4all.nl
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /var/www/html/

Options FollowSymLinks
AllowOverride None


Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
RedirectMatch ^/$ /apache2-default/


ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all


ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined
ServerSignature On

Alias /doc/ "/usr/share/doc/"

Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128





ServerName www.sailmaster.nl
ServerAlias sailmaster.nl *.sailmaster.nl
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /var/www/html/



ServerName www.gijpstuiver.nl
ServerAlias gijpstuiver.nl *.gijpstuiver.nl
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /var/www/blogs/



ServerName webmail.sailmaster.nl
ServerAdmin [EMAIL PROTECTED]

DocumentRoot /var/www/html/webmail
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined

SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.pem



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact
[EMAIL PROTECTED]



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Virtual hosting problem

2006-10-26 Thread Laser144
Hi,

On my server (Sarge with Apache2) I am trying to host multiple
websites.
The www.sailmaster.nl and webmail.sailmaster.nl work fine, but
nubicula.xs4all.nl connects to /var/www/apache-default/ and
www.gijpstuiver.nl cannot be reached.

How can I fix this? My /etc/apache2/sites-available/default is printed
below.

Regards,

Andy



NameVirtualHost *:443
NameVirtualHost *:80


ServerName nubicula.xs4all.nl
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /var/www/html/

Options FollowSymLinks
AllowOverride None


Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
RedirectMatch ^/$ /apache2-default/


ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all


ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined
ServerSignature On

Alias /doc/ "/usr/share/doc/"

Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128





ServerName www.sailmaster.nl
ServerAlias sailmaster.nl *.sailmaster.nl
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /var/www/html/



ServerName www.gijpstuiver.nl
ServerAlias gijpstuiver.nl *.gijpstuiver.nl
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /var/www/blogs/



ServerName webmail.sailmaster.nl
ServerAdmin [EMAIL PROTECTED]

DocumentRoot /var/www/html/webmail
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined

SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.pem



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: problems with apache2 and virtual hosting

2005-09-25 Thread Simo Kauppi
On Sat, Sep 24, 2005 at 08:00:24PM -0700, Todd A. Jacobs wrote:
> I'm running apache2/stable 2.0.54-5, and am not able to get virtual
> hosts to work correctly. All requests are being handled by the default
> virtual host, which is obviously not what I want.
> 
> I've defined the following in apache2.conf:
> 
> NameVirtualHost *
> 
>   ServerName www.codegnome.org
>   ServerAlias *.codegnome.org codegnome.org
>   DocumentRoot /srv/www/codegnome/
> 
> 
>   ServerName  www.mmipresentations.com
>   ServerAlias mmipresentations.com
>   DocumentRoot /srv/www/mmi/
> 
>  
> but all requests are falling back to the default virtual host without
> anything constructive in the log files (even with debug turned on):
> 
> 12.155.166.58 - - [24/Sep/2005:19:50:30 -0700] "GET / HTTP/1.1" 200 1317
> "http://www.mmipresentations.com/"; "Mozilla/5.0 (X11; U; Linux i686; 
> en-US;
> rv:1.7.10) Gecko/20050825 Firefox/1.0.4 (Debian package 1.0.4-2sarge3)"
> 
> The configuration looks okay to me. What could be causing it to fail
> back to the default virtual host? How do I debug this further?
> 
> -- 
> Re-Interpreting Historic Miracles with SED #141: %s/water/wine/g

Hi,

I trust, you have restarted apache2 after the changes :)

Do you have anything in the /etc/apache2/sites-enabled/ -directory? If
you do, they might conflict with your directives in the apache2.conf.
The include for the sites-enabled -directory is the last line in the
apache2.conf, so if you prefer defining your sites in the apache2.conf I
guess you can safely comment out that include line.

Simo
-- 
:r ~/.signature


signature.asc
Description: Digital signature


Re: problems with apache2 and virtual hosting

2005-09-24 Thread Robert Wolfe
Try removing the * from 
--
Robert Wolfe, MCP
[EMAIL PROTECTED]


- Original Message 
From: Todd A. Jacobs <[EMAIL PROTECTED]>
To: Debian User List 
Subject: problems with apache2 and virtual hosting
Date: 25/09/05 00:16

> I'm running apache2/stable 2.0.54-5, and am not able to get virtual
> hosts to work correctly. All requests are being handled by the default
> virtual host, which is obviously not what I want.
> 
> I've defined the following in apache2.conf:
> 
> NameVirtualHost *
> <VirtualHost *>
>   ServerName www.codegnome.org
>   ServerAlias *.codegnome.org codegnome.org
>   DocumentRoot /srv/www/codegnome/
> </VirtualHost>
> <VirtualHost *>
>   ServerName  www.mmipresentations.com
>   ServerAlias mmipresentations.com
>   DocumentRoot /srv/www/mmi/
> </VirtualHost>
>  
> but all requests are falling back to the default virtual host without
> anything constructive in the log files (even with debug turned on):
> 
> 12.155.166.58 - - [24/Sep/2005:19:50:30 -0700] "GET /
HTTP/1.1" 200 1317
> "http://www.mmipresentations.com/"; "Mozilla/5.0 (X11;
U; Linux i686; en-US;
> rv:1.7.10) Gecko/20050825 Firefox/1.0.4 (Debian package
1.0.4-2sarge3)"
> 
> The configuration looks okay to me. What could be causing it to fail
> back to the default virtual host? How do I debug this further?
> 
> -- 
> Re-Interpreting Historic Miracles with SED #141: %s/water/wine/g
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
> with a subject of "unsubscribe". Trouble? Contact
[EMAIL PROTECTED]
> 
> 
> 

__
Message sent using UebiMiau v 2.7.8 [Debian GNU/Linux for Sparc64 'Etch']


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



problems with apache2 and virtual hosting

2005-09-24 Thread Todd A. Jacobs
I'm running apache2/stable 2.0.54-5, and am not able to get virtual
hosts to work correctly. All requests are being handled by the default
virtual host, which is obviously not what I want.

I've defined the following in apache2.conf:

NameVirtualHost *

ServerName www.codegnome.org
ServerAlias *.codegnome.org codegnome.org
DocumentRoot /srv/www/codegnome/


ServerName  www.mmipresentations.com
ServerAlias mmipresentations.com
DocumentRoot /srv/www/mmi/

 
but all requests are falling back to the default virtual host without
anything constructive in the log files (even with debug turned on):

12.155.166.58 - - [24/Sep/2005:19:50:30 -0700] "GET / HTTP/1.1" 200 1317
"http://www.mmipresentations.com/"; "Mozilla/5.0 (X11; U; Linux i686; en-US;
rv:1.7.10) Gecko/20050825 Firefox/1.0.4 (Debian package 1.0.4-2sarge3)"

The configuration looks okay to me. What could be causing it to fail
back to the default virtual host? How do I debug this further?

-- 
Re-Interpreting Historic Miracles with SED #141: %s/water/wine/g


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: awstats with mass virtual hosting

2004-10-25 Thread Michael
> Hi,
> I have a  machine with a lot of virtual hosts. For that I am using
> apache with mass virtual hosting. Now I have to run awstats on each
> single virtual host. I was curious what is the beste metod to do that ?
> As far as I read I have to have one conf for each virtual host. I was
> curios how is it better for awstats ? To have one big log file, each
> line containing the virtual host, or to have one log file for each
> virtual host ?
>
> Any suggestions, idea, etc. how to do that will be apreciate. I must say
> I never used awstats before.
> Thank you very much.


What I do is setup a config directory with all my config files. Then use a
model file and change the log location and host name in each one for each
virtual site. There is a perl script (awstats_updateall.pl) that comes
with awstats in the tools directory that will read all the config files in
your directory and post the data to one big data dump. I just cron that
out to run right before logrotate does it's thing with apache's logs. Then
on apache I setup a alias for the stats directory, icons, etc.. and from
the URL it will read the seperate data/config files for awstats based on
the site when the user runs awstats.pl.

Here is the tool
http://awstats.sourceforge.net/docs/awstats_tools.html

With a working configuration it is a simple cp and quick edit job for each
virtual host. You can easily script the process out if you have a 'whole
lot' of hosts.

-Michael


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: awstats with mass virtual hosting

2004-10-25 Thread Pritpal Dhaliwal

Cristi Banciu wrote:
Hi,
I have a  machine with a lot of virtual hosts. For that I am using 
apache with mass virtual hosting. Now I have to run awstats on each 
single virtual host. I was curious what is the beste metod to do that ? 
As far as I read I have to have one conf for each virtual host. I was 
curios how is it better for awstats ? 
To have one big log file, each
line containing the virtual host, or to have one log file for each 
virtual host ?
I don't think this would be a good idea. You will be scanning the whole 
log file for each host.

Any suggestions, idea, etc. how to do that will be apreciate. I must say 
I never used awstats before.
Thank you very much.


awstats can do static stats.. that is.. stats will be calculated when 
you tell awstats to do it.. and all the files will be created then.. 
thats probably what you want to do go with.

don't do cgi.. or.. you can do cgi and give owners access to update the 
stats whenever they want or tell the cgi to run every 5-6 hours.. or 24 
hours.. you need to do some reading before you decide on this time..

at any rate.. awstats rocks
Pritpal Dhaliwal
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



RE: awstats with mass virtual hosting

2004-10-25 Thread Gilbert, Joseph
I am not familiar with awstats but I believe you will have to split the log
files into individual files per site.  The main reason for this is that
there is, by default, no entry in the access log file for the site accessed.
Thus, your stat analysis tool would not be able to distinguish the different
sites.

There may be other ways of doing it but AFAIK, having individual log files
for each virtual host is the way to do it.  I do not envy you the task of
modifying each set of virtualhost statements in your config file.

Joe

-Original Message-
From: Cristi Banciu [mailto:[EMAIL PROTECTED]
Sent: Sunday, October 24, 2004 11:34 AM
To: [EMAIL PROTECTED]
Subject: awstats with mass virtual hosting


Hi,
I have a  machine with a lot of virtual hosts. For that I am using 
apache with mass virtual hosting. Now I have to run awstats on each 
single virtual host. I was curious what is the beste metod to do that ? 
As far as I read I have to have one conf for each virtual host. I was 
curios how is it better for awstats ? To have one big log file, each 
line containing the virtual host, or to have one log file for each 
virtual host ? 

Any suggestions, idea, etc. how to do that will be apreciate. I 
must say 
I never used awstats before.
Thank you very much.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact 
[EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



awstats with mass virtual hosting

2004-10-24 Thread Cristi Banciu
Hi,
I have a  machine with a lot of virtual hosts. For that I am using 
apache with mass virtual hosting. Now I have to run awstats on each 
single virtual host. I was curious what is the beste metod to do that ? 
As far as I read I have to have one conf for each virtual host. I was 
curios how is it better for awstats ? To have one big log file, each 
line containing the virtual host, or to have one log file for each 
virtual host ? 

Any suggestions, idea, etc. how to do that will be apreciate. I must say 
I never used awstats before.
Thank you very much.

--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: perl program to log apache access.log with mass virtual hosting

2004-10-24 Thread David Clymer
On Sat, 2004-10-23 at 08:07, Cristi Banciu wrote: 
> Hi,
> 
> I am using apache with mass virtual hosting. I need to keep separate log 
> files for each vhosts into something like thist
> /var/log/httpd/$vhost.without.www/$year/$month/$day/access.log
> 
> I have found a little perl script that says it does that. Unfortunatelly 
> it does not working, apache error.log saying something like this:
> piped log program '/usr/local/sbin/logger' failed unexpectedly
> 
> Here is the perl script
> ###start program ###

Your script must _not_ start with the line above. It should start with
the line below. It wont be run as a perl script otherwise.

> #!/usr/bin/perl


Try the function below without the parenthesis. 

> sub writeLog(){
> my $logDir = shift @_;
> my $type = shift @_;
> if( ! -d $logDir ) {
> `mkdir -p $logDir`;
> }

That got it to work for me.

-davidc


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: perl program to log apache access.log with mass virtual hosting

2004-10-24 Thread David Clymer
On Sat, 2004-10-23 at 08:07, Cristi Banciu wrote:
> Hi,
> 
> I am using apache with mass virtual hosting. I need to keep separate log 
> files for each vhosts into something like thist
> /var/log/httpd/$vhost.without.www/$year/$month/$day/access.log
> 
> I have found a little perl script that says it does that. Unfortunatelly 
> it does not working, apache error.log saying something like this:
> piped log program '/usr/local/sbin/logger' failed unexpectedly
> 
> Here is the perl script
> ###start program ###
> #!/usr/bin/perl

Have you tried using the -w switch (#!/usr/bin/perl -w) and running it
manually?

logger.pl < my_favorite_access.log

If so, what (if any) errors/warnings do you see?

-davidc


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



perl program to log apache access.log with mass virtual hosting

2004-10-23 Thread Cristi Banciu
Hi,
I am using apache with mass virtual hosting. I need to keep separate log 
files for each vhosts into something like thist
/var/log/httpd/$vhost.without.www/$year/$month/$day/access.log

I have found a little perl script that says it does that. Unfortunatelly 
it does not working, apache error.log saying something like this:
piped log program '/usr/local/sbin/logger' failed unexpectedly

Here is the perl script
###start program ###
#!/usr/bin/perl
#Script to pipe apache log entries to virtually hosted log files
# Assumes httpd.conf has the following:
# LogFormat "%v %h %l %u %t \"%r\" %>s %b" commonvhost
# and that ONLY the following logging line is used in the httpd.conf:
# CustomLog "| /path/to/logger.pl" commonvhost
# DO NOT configure the CustomLog directive in the vhost stubs for vhosts
# or this will not work.
# Script logs commonvhost entries to a logfile with a template of:
# /var/log/httpd/virtual.domain/$year/$month/$day
use strict;
my $logEntry = <>;
# get the vhost from this log entry:
$logEntry=~/(.*?) /;
my $vhost = $1;
my ($year, $month, $day) = (
(localtime)[5]+1900,
sprintf("%02d", (localtime)[4]+1),
sprintf("%02d", (localtime)[3])
);
# Name of access logfiles:
my $accessLogName = "vhosts_log";
my $logDir = "/var/log/httpd";
my $allLogDir = "$logDir/all/$year/$month/$day";
my $vhostLogDir = "$logDir/$vhost/$year/$month/$day";
writeLog($allLogDir, "all");
writeLog($vhostLogDir, "vhost");
# write a log entry to a file
sub writeLog(){
my $logDir = shift @_;
my $type = shift @_;
if( ! -d $logDir ) {
`mkdir -p $logDir`;
}
open(FD, ">>$logDir/$accessLogName");
# if type is vhost, strip off the vhost data:
if($type eq "vhost"){
$logEntry =~s/.*? //;
}
print FD $logEntry;
close FD;
}
###end program ###
Can anyone tell me what have I done wrong ?
Thank you very much!
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: apache + mass virtual hosting +tomcat please help (resin ??)

2004-10-15 Thread Pritpal Dhaliwal
You can accomplish this with resin.
You can tell resin which hosts resin should take care of and which it 
shouldn't.

read some docs and give it a whirl
www.caucho.com
resin 3.0.9 has been release as GPL.
Pritpal Dhaliwal

Roozemond, D.A. wrote:
 Hi,

Few virtual sites needs tomcat in order to work. I have installed 
tomcat4 and mod_jk2, but I have no idea how could I tell that
www.tomcatsite.com which is 
/var/vhosts/www.tomcatsite.com/httpdocs is a 
site that requires java ?

IIRC Tomcat is a standalone program, not a plugin for apache. This means
tomcat needs to listen on port 80 in order to serve http requests, and
this is exactly the port where apache wants to listen on (and apparently
is listening on, if all this mass virtual hosting is actually working).
So I think it is not possible to have apache serve requests to
http://somesite1.com and tomcat requests for http://somesite2.com
(although there might be a workaround with bridged networking etc). The
easiest solution I see is letting tomcat run on port 81 (for instance),
and tell apache to redirect any requests for http://www.tomcatsite.com/
to http://www.tomcatsite.com:81/, which tomcat will then serve (probably
in a manner similar to the one you defined in apache).
Hope I made it somewhat clearer...
Dan


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: apache + mass virtual hosting +tomcat please help

2004-10-14 Thread S.D.A.
On Thu, Oct 14, 2004 at 10:37:20PM +0200 or thereabouts, Roozemond, D.A. wrote:
 
> IIRC Tomcat is a standalone program, not a plugin for apache. This means
> tomcat needs to listen on port 80 in order to serve http requests, and
> this is exactly the port where apache wants to listen on (and apparently
> is listening on, if all this mass virtual hosting is actually working).

I can't help with the OPs problem, but Tomcat does run standalone or integrated
into Apache. Makes sense as Tomcat is part of the Apache project. See;

<http://jakarta.apache.org/tomcat/faq/connectors.html#integrate>

<http://jakarta.apache.org/index.html>
   ^^^
Might be a better place for the OP to find his answer.

-- 
Steve
+
  Thursday Oct 14 2004 05:11:01 PM EDT
+
I am a man: nothing human is alien to me.
-- Publius Terentius Afer (Terence)


signature.asc
Description: Digital signature


Re: apache + mass virtual hosting +tomcat please help

2004-10-14 Thread Cristi Banciu
Roozemond, D.A. wrote:
(although there might be a workaround with bridged networking etc). The
easiest solution I see is letting tomcat run on port 81 (for instance),
and tell apache to redirect any requests for http://www.tomcatsite.com/
to http://www.tomcatsite.com:81/, which tomcat will then serve (probably
in a manner similar to the one you defined in apache).
 

Yes, I run tomcat on 8080 and I am using mod_jk2 to bind tomcat with 
apache. I just don't know how to tell apache to call tomcat for
one particular virtual host .

Hope I made it somewhat clearer...
 

Yes, you did
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



RE: apache + mass virtual hosting +tomcat please help

2004-10-14 Thread Roozemond, D.A.
 Hi,

> Few virtual sites needs tomcat in order to work. I have installed 
> tomcat4 and mod_jk2, but I have no idea how could I tell that
> www.tomcatsite.com which is 
> /var/vhosts/www.tomcatsite.com/httpdocs is a 
> site that requires java ?

IIRC Tomcat is a standalone program, not a plugin for apache. This means
tomcat needs to listen on port 80 in order to serve http requests, and
this is exactly the port where apache wants to listen on (and apparently
is listening on, if all this mass virtual hosting is actually working).

So I think it is not possible to have apache serve requests to
http://somesite1.com and tomcat requests for http://somesite2.com
(although there might be a workaround with bridged networking etc). The
easiest solution I see is letting tomcat run on port 81 (for instance),
and tell apache to redirect any requests for http://www.tomcatsite.com/
to http://www.tomcatsite.com:81/, which tomcat will then serve (probably
in a manner similar to the one you defined in apache).

Hope I made it somewhat clearer...

Dan



apache + mass virtual hosting +tomcat please help

2004-10-14 Thread Cristi Banciu
Hi,
I have configured apache with mass virtual hosting by adding following 
line to apache's conf files.

VirtualDocumentRoot /var/vhosts/%0/httpdocs/
and everything seems to work just fine with a little exception.
Few virtual sites needs tomcat in order to work. I have installed 
tomcat4 and mod_jk2, but I have no idea how could I tell that
www.tomcatsite.com which is /var/vhosts/www.tomcatsite.com/httpdocs is a 
site that requires java ?

Sorry if I am confuse!
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Apache dynamically configured mass virtual hosting

2002-02-19 Thread J. Paul Bruns-Bielkowicz
> So from what you did provide the only difference it seems is
> that I'm using NameVirtualHost... And have my mod_vhost directives
> within the  block...

That was the key that made my configuration work.

Thanks.
J. Paul Bruns-Bielkowicz



Re: Apache dynamically configured mass virtual hosting

2002-02-19 Thread Jeremy T. Bouse
I'm making heavy use of the vhost_alias module on my web
server... In fact config specific for it is as follows:

LoadModule vhost_alias_module /usr/lib/apache/1.3/mod_vhost_alias.so
UseCanonicalName Off
NameVirtualHost [My Web Servers IP]

 
VirtualDocumentRoot /var/www/%3/%2/%1
VirtualScriptAlias /var/www/%3/%2/cgi-bin/%1
 


Now I do some mod_rewrite rules to make sure everything comes
as a 3 part hostname (host.sld.tld) so when it receives a query for say
http://www.example.org/ it will look in /var/www/org/example/www for the
DocumentRoot and /var/www/org/example/cgi-bin/www for any /cgi-bin/
references... 

With this setup 'apache -S' returns:

VirtualHost configuration:
[My Web Server IP]  is a NameVirtualHost
default server [server hostname] 
(/etc/apache/httpd.conf:1067)
port 80 namevhost [server hostname] 
(/etc/apache/httpd.conf:1067)

So from what you did provide the only difference it seems is
that I'm using NameVirtualHost... And have my mod_vhost directives
within the  block...

Jeremy

On Tue, Feb 19, 2002 at 05:04:37PM +0100, J. Paul Bruns-Bielkowicz wrote:
> Hi,
> I'm trying to setup apache for dynamically configured mass virtual hosting.
> I've followed the documentation explicitly.
> 
> LoadModule vhost_alias_module /usr/lib/apache/1.3/mod_vhost_alias.so
> UseCanonicalName Off
> LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
> CustomLog logs/access_log vcommon
> VirtualDocumentRoot /www/hosts/%0/docs
> VirtualScriptAlias  /www/hosts/%0/cgi-bin
> 
> After stopping and restarting apache output for apache -S
> is:
> VirtualHost configuration:
> 
> There don't seem to be any virtual hosts. All I get is error 404 regardless
> of whether I use the IP address or www.name.server.org
> 
> My server is Apache/1.3.22 (Unix) Debian GNU/Linux mod_ssl/2.8.5
> OpenSSL/0.9.6a PHP/4.1.1
> 
> Any suggestions are welcome.
> Thanks,
> J. Paul Bruns-Bielkowicz
> http://www.america.prv.pl
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Apache dynamically configured mass virtual hosting

2002-02-19 Thread J. Paul Bruns-Bielkowicz
Hi,
I'm trying to setup apache for dynamically configured mass virtual hosting.
I've followed the documentation explicitly.

LoadModule vhost_alias_module /usr/lib/apache/1.3/mod_vhost_alias.so
UseCanonicalName Off
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
CustomLog logs/access_log vcommon
VirtualDocumentRoot /www/hosts/%0/docs
VirtualScriptAlias  /www/hosts/%0/cgi-bin

After stopping and restarting apache output for apache -S
is:
VirtualHost configuration:

There don't seem to be any virtual hosts. All I get is error 404 regardless
of whether I use the IP address or www.name.server.org

My server is Apache/1.3.22 (Unix) Debian GNU/Linux mod_ssl/2.8.5
OpenSSL/0.9.6a PHP/4.1.1

Any suggestions are welcome.
Thanks,
J. Paul Bruns-Bielkowicz
http://www.america.prv.pl



Re: virtual hosting in apache and file locations

2001-10-20 Thread will trillich
On Tue, Oct 02, 2001 at 09:39:58PM +1000, Daniel Stone wrote:
> On Tue, Oct 02, 2001 at 12:43:43PM +0200, martin f krafft wrote:
> > ...equinomial[1]...
> > [1] no, this isn't a word. but it should be. you get the idea...
> 
> It's a damn cool word. I second its introduction to the English
> language.

how about 'eponymous'? :)

-- 
DEBIAN NEWBIE TIP #77 from USM Bish <[EMAIL PROTECTED]>
:
Oh No ! I have DELETED MY /TMP BY MISTAKE. How do I recreate
it? Here's your goal:
drwxrwxrwt  8 root  root   2048 Jan  7 13:34 /tmp
Notice the permisions! As root, do these:
# cd /
# mkdir tmp
# chmod 1777 tmp
# chown root.root tmp
That's all there is to it.

Also see http://newbieDoc.sourceForge.net/ ...



other data WAS: Re: /var and /usr Re: virtual hosting in apache and file locations

2001-10-02 Thread Erik Steffl
Ola Lundqvist wrote:
> 
> On Tue, Oct 02, 2001 at 10:27:49AM +0200, martin f krafft wrote:
> > i always wondered just why debian apache puts the main homepage of a
> > server into /var/www. /var isn't made for stuff that's persistens like
> > a homepage! in addition, where do virtual hosts go? in general, once
> 
> Well I want to tell some people why /var is used.
> 
> /usr is used for data that can be read-only. You can remount your
>   usr partition read only and the system will still work.
> 
> /var is used for data that can or should not be kept read only, like
>   logs, spools, "variable data" like homepages and other things that
>   need to be changed from time to time (without root permissions to
>   remount the partition).
> 
> /home is used for user data and should never be changed by packages.
>   home are often on a separate disk or mounted over nfs so that data
>   should not be changed by the system. Imagine if you are reinstalling
>   the sytem and spares the home partition/drive and later mount that.
>   You will have to move files manually.

  so I guess /var is also a good place to hold other data that belong to
sort of everybody? e.g. the mp3 collection, backgrounds (for desktops
etc.) and all that kind of data that should be accessible to everybody
(on the system)?

erik



/var and /usr Re: virtual hosting in apache and file locations

2001-10-02 Thread Ola Lundqvist
On Tue, Oct 02, 2001 at 10:27:49AM +0200, martin f krafft wrote:
> i always wondered just why debian apache puts the main homepage of a
> server into /var/www. /var isn't made for stuff that's persistens like
> a homepage! in addition, where do virtual hosts go? in general, once

Well I want to tell some people why /var is used.

/usr is used for data that can be read-only. You can remount your
  usr partition read only and the system will still work.

/var is used for data that can or should not be kept read only, like
  logs, spools, "variable data" like homepages and other things that
  need to be changed from time to time (without root permissions to
  remount the partition).

/home is used for user data and should never be changed by packages.
  home are often on a separate disk or mounted over nfs so that data
  should not be changed by the system. Imagine if you are reinstalling
  the sytem and spares the home partition/drive and later mount that.
  You will have to move files manually.

So there are reasons on why the /usr /var /etc and /home exists. Let
people use /home as they wish not by the system.

CUT

> right now, i solve this by having symlinks from /var/www/servername to
> the homedirectory of the responsible person for the domain, so that
> the actual data reside on /home. but that's not the way debian handles
> this, and i am wondering just why?

Because home should never be toughed by any package. It is the same way
as no package ever should touch /usr/local. You should be able to move
the /home drive to some other machine if the system fails without
the need of fixing files in there.

> why is debian apache making /var/www be the main directory, and why is

Probably the same reason for why /var/mail exists. A common location for
all webbservers.

> debian apache not providing an easily extensible location for virtual
> domain data?

That is a good question though. I think /var/www is a good place for that.
But there are implications. A lot of people (like me) have the www-data
in /var/www and changing that without asking the user first is a bad
thing. But if you have a debconf question about this:

"What virtual hostname do you use for the default web pages"

"The apache team have decided to move the location of the standard
web pages from /var/www to /var/www/default to make it possible to
allow a easy system for virtual hosts. Do you want the files to be moved
by the apache configuration scripts?"
yes NO (no should be default)

Regards,

// Ola

-- 
 - Ola Lundqvist ---
/  [EMAIL PROTECTED] Björnkärrsgatan 5 A.11   \
|  [EMAIL PROTECTED] 584 36 LINKÖPING |
|  +46 (0)13-17 69 83  +46 (0)70-332 1551   |
|  http://www.opal.dhs.org UIN/icq: 4912500 |
\  gpg/f.p.: 7090 A92B 18FE 7994 0C36  4FE4 18A1 B1CF 0FE5 3DD9 /
 ---



Re: virtual hosting in apache and file locations

2001-10-02 Thread Grzegorz Prokopski
Hi !

I really like what Angus has showed about his apache config.
I have "my" option too ;-) - of course...

ATM I can see two major options (no matter where symlinks go):
1) /var/www/$FQDN/, /var/log/apache/$FQDN-{access|error}.log
2) /home/$DOMAINUSER/{somedirhere}/ everything in this dir

IMHO there always be at least those two options and people
who use some of them.

Thrid option is "standard" /var/www. And I would like to go
this path: "Don't touch if it is not broken, if it is broken - fix it,
but don't change".

So for me it would be nice to have /var/www/default holding
files for default domain (all those installed in Potato under /var/www).
Then admin could change it to a symlink to some domain etc.

Remember that primary point was that using /var/www as
default domain place is non-social bechaviour or
non-VirtDomain-friendly. And that is the thing to be fixed.

Using /home/www-data/ for apache would suggest that for
EVERY virtual domain must be created separate user which
is not always true.

Just my 0.02$

Grzegorz Prokopski

PS: I never could understand why in RH (at the time I used to
use 6.2) kept web root somewhere in /home/apache or sth ???



Re: virtual hosting in apache and file locations

2001-10-02 Thread Angus D Madden
On Tue, Oct 02, 2001 at 10:27:49AM +0200, martin f krafft wrote:
> 
> why is debian apache making /var/www be the main directory, and why is
> debian apache not providing an easily extensible location for virtual
> domain data?
> 

I think it's because TIMTOWTDI, and everyone has their own 
preference.  It'd be nice if the example virtual host in the default
httpd.conf supplied by debian suggested some locations, but the fact
that it doesn't may be intentional.

FWIW, this is what I do:

I create a new user (no password and login diabled) for each virtual host.
I find that having a distinct user makes it easier to manage tasks for each
virtual host (e.g. cron jobs + mail) and i can also have the files 
owned by that distinct user.  I can also tarball the user's home 
directory and move the entire site to another location easily.  Is 
there any reason not to do it this way?  I have a script that adds 
the user and each virtual host automagically.

my VirtualHost's then look like this:


ServerAdmin [EMAIL PROTECTED]
DocumentRoot /home/USERNAME/htdocs
ServerName DOMAIN
ServerAlias *.DOMAIN
ErrorLog /home/USERNAME/www-logs/DOMAIN-error.log
CustomLog /home/USERNAME/www-logs/DOMAIN-access.log combined

Options Indexes Includes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all

# Update the cgi settings if necessary and update
# you'll have to create /home/USERNAME/htdocs/cgi-bin/
# ScriptAlias /cgi-bin/ /home/USERNAME/htdocs/cgi-bin/
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
# 

AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all



g


pgpY5ZwJb10FJ.pgp
Description: PGP signature


Re: virtual hosting in apache and file locations

2001-10-02 Thread Dave Sherohman
On Tue, Oct 02, 2001 at 08:10:38PM +1000, Daniel Stone wrote:
> The default web root will be /var/www/default. There must be no files in
> /var/www; as a temporary measure, a daily cronjob may be implemented to
> move all files from /var/www to /var/www/default.

If you really feel that this is necessary, be sure to document the
hell out of it - warnings on package install, explanation of what is
being done (and why, which I'm not really clear on) in
/usr/share/doc, email messages informing the sysadmin when files are
moved including a reference to the explanation in /usr/share/doc,
etc.  I doubt that I'm the only one who keeps an index.html in
/var/www which just says, "I don't know which virtual domain you
wanted, so here are a list of the options with links that will bring
them up for you." and I would be thoroughly upset if that were to be
moved while I'm not looking.  Especially if it got moved into a
directory which already contains a perfectly good (and much more
meaningful) index.html.

Choosing a default configuration for packages is a good thing to do
as well as probably being necessary.  Forcing admins to stick to that
configuration with cronjobs that periodically 'repair' any deviation
from the default is not.

-- 
When we reduce our own liberties to stop terrorism, the terrorists
have already won. - reverius



Re: virtual hosting in apache and file locations

2001-10-02 Thread P Kirk
On Tue, Oct 02, 2001 at 10:01:43AM -0500, Dave Sherohman wrote:
>On Tue, Oct 02, 2001 at 10:27:49AM +0200, martin f krafft wrote:
>> i always wondered just why debian apache puts the main homepage of a
>> server into /var/www.
>
>Because it can change during normal system operation (rules out /usr
>and anything that typically resides on the root device), doesn't
>belong to any particular user (rules out /home - and your pages
>shouldn't belong to www-data unles you want to let crackers deface
>them), and it's persistent (rules out /tmp).
>
>> in addition, where do virtual hosts go?
>
>I keep mine in /var/www/domain.tld.  Based on other responses in this
>thread, that seems to be a fairly common usage.

I tend to put them in users home directories www folder and its easy to
put the entries in /etc/apache/httpd.conf.



Re: virtual hosting in apache and file locations

2001-10-02 Thread Dave Sherohman
On Tue, Oct 02, 2001 at 10:27:49AM +0200, martin f krafft wrote:
> i always wondered just why debian apache puts the main homepage of a
> server into /var/www.

Because it can change during normal system operation (rules out /usr
and anything that typically resides on the root device), doesn't
belong to any particular user (rules out /home - and your pages
shouldn't belong to www-data unles you want to let crackers deface
them), and it's persistent (rules out /tmp).

> in addition, where do virtual hosts go?

I keep mine in /var/www/domain.tld.  Based on other responses in this
thread, that seems to be a fairly common usage.

> right now, i solve this by having symlinks from /var/www/servername to
> the homedirectory of the responsible person for the domain, so that
> the actual data reside on /home.

Why the symlink?  I make a domain-admin group for each vhost and
chown /var/www/domain.tld to someuser.domain-admin.  Lets the admins
manage their own domains and keeps the data on /var where (IMO) it
belongs.

> why is debian apache making /var/www be the main directory, and why is
> debian apache not providing an easily extensible location for virtual
> domain data?

Setting up a vhost is a system task.  Since it already requires root
access, putting the directory under /var/www instead of ~domainadmin
isn't a significant burden.  Creating a new domain-admin group
requires an extra step or two, but allows for a vhost having multiple
admins; if there's only one admin, this can be skipped.

-- 
When we reduce our own liberties to stop terrorism, the terrorists
have already won. - reverius



Re: virtual hosting in apache and file locations

2001-10-02 Thread Daniel Stone
On Tue, Oct 02, 2001 at 12:56:35PM +0100, xio wrote:
> On Tue, Oct 02, 2001 at 08:10:38PM +1000, Daniel Stone wrote:

[excessive quoting trimmed]

> > /var/log/apache(2)/default should be symbolic links to the relevant
> > directories.
> 
> Why not have virtual and default documents in /var/www/?
> Might be more consistent then having a default dir and then different
> domainname directories...

"should be symbolic links". Basically, as I outlined to Martin,
/var/www/default, etc, would be symlinks to, say,
/var/www/www.debianplanet.org, if www.debianplanet.org was your default 
host.

[more quoting trimmed]

:) d

-- 
Daniel Stone<[EMAIL PROTECTED]>
 heya, how can I decode MIME message?
 inouk: is he making movements with his hands like there is something 
keeping them? That decodes as the "glass wall routine". The RFC also lists 
on how to decode the "running down the stairs" routine and some other classics.



Re: virtual hosting in apache and file locations

2001-10-02 Thread xio
On Tue, Oct 02, 2001 at 08:10:38PM +1000, Daniel Stone wrote:
> On Tue, Oct 02, 2001 at 10:27:49AM +0200, martin f krafft wrote:
> > i always wondered just why debian apache puts the main homepage of a
> > server into /var/www. /var isn't made for stuff that's persistens like
> > a homepage! in addition, where do virtual hosts go? in general, once
> > a virtual host is defined, one had better defined a virtual host for
> > the primary hostname too so as to make apache work better (my
> > experience). but as soon as server.mydomain.com and
> > virtual.mydomain.com are both hosted by the same server, and are both
> > virtual domains, they should technically be in the same hierarchy.
> 
> 07:45PM|> why was /var/www chosen?
> 07:45PM| DanielS: FHS?
> 07:46PM| DanielS: not that im saying it makes sense. but thats
> the reasoning.
> 
> Yes, this starts to get flaky once you get to virtual hosts.
> 
> > right now, i solve this by having symlinks from /var/www/servername to
> > the homedirectory of the responsible person for the domain, so that
> > the actual data reside on /home. but that's not the way debian handles
> > this, and i am wondering just why?
> 
> I think that a symlink from /var to /home is bad. Maybe if we stored it
> under /home/www-data or such.
> 
> Actually, this is my proposal (to be common policy for apache and
> apache2, but I'm obviously not speaking for Thom):
> 
> The default web root will be /var/www/default. There must be no files in
> /var/www; as a temporary measure, a daily cronjob may be implemented to
> move all files from /var/www to /var/www/default. The same applies for
> cgi-bin - the default site has CGIs in /usr/lib/cgi-bin/default, and, as
> a temporary measure, a daily cronjob may be implemented to move all
> files from /usr/lib/cgi-bin to /usr/lib/cgi-bin/default. Logs should be
> in /var/log/apache(2)/default (the 2 obviously only applies for
> apache2).
> 
> Web documents for virtual hosts should be installed as
> /var/www/host.name (e.g. /var/www/www.debianplanet.org). This directory
> may or may not be a symbolic link anywhere else. CGIs for virtual hosts
> should follow the same format - /usr/lib/cgi-bin/host.name. The same
> also applies for logs - /var/log/apache(2)/default. If using virtual 
> hosts, there should be directories of this format for all hosts, and 
> /var/www/default, /usr/lib/cgi-bin/default and
> /var/log/apache(2)/default should be symbolic links to the relevant
> directories.
> 

Why not have virtual and default documents in /var/www/?
Might be more consistent then having a default dir and then different
domainname directories...
> 
> Whaddya think?
> 
> Oh, and while I'm at it, please move the apache manual to
> /usr/share/apache/manual, and have an Alias /manual/, or such. Or maybe
> even a /var/www/default/manual alternative? (I believe Thom implemented
> this, but it's on his laptop *sigh*). Currently apache2 has an alias.
> This stops conflicts.
> 
> Should we also standardise the default configuration to produce a single
> combined log by default? (If it does this already, ignore me).
> 
> > why is debian apache making /var/www be the main directory, and why is
> > debian apache not providing an easily extensible location for virtual
> > domain data?
> 
> I think that it should remain that way, but hey, this is my main server:
> [EMAIL PROTECTED]:~% ls -l /var
> lrwxrwxrwx1 root root9 Jul  4 09:48 /var ->
> /home/var
> 
> I think putting the "may or may not be a symlink" bit basically says,
> "make it a symlink if you want". IMHO putting it in /home isn't The
> Right Thing, but there you go. What does everyone else think?
> 
> :) d
> 
> -- 
> Daniel Stone  <[EMAIL PROTECTED]>
>  Booting... /vmunix.el



-- 

GPG Keyid 0x0FCD0EE2
GPG Fingerprint C2FF 6147 0ADB 1674 4096  2339 370F CBDF 0FCD 0EE2

fortune - print a random, hopefully interesting, adage:

Almost anything derogatory you could say about today's software design
would be accurate.
-- K.E. Iverson


pgpUEOdKZheQd.pgp
Description: PGP signature


Re: virtual hosting in apache and file locations

2001-10-02 Thread xio
On Tue, Oct 02, 2001 at 10:27:49AM +0200, martin f krafft wrote:
> i always wondered just why debian apache puts the main homepage of a
> server into /var/www. /var isn't made for stuff that's persistens like
> a homepage! in addition, where do virtual hosts go? in general, once
> a virtual host is defined, one had better defined a virtual host for
> the primary hostname too so as to make apache work better (my
> experience). but as soon as server.mydomain.com and
> virtual.mydomain.com are both hosted by the same server, and are both
> virtual domains, they should technically be in the same hierarchy.
> 

http://www.pathname.com/fhs/pub/fhs-2.2.txt.gz:


"5.  The /var Hierarchy

   5.1  Purpose

   /var contains variable data files.  This includes spool directories and
   files, administrative and logging data, and transient and temporary
   files.

[...]

   /var is specified here in order to make it possible to mount /usr read-
   only.  Everything that once went into /usr that is written to during
   system operation (as opposed to installation and software maintenance)
   must be in /var."

I think html files can be defined as variable data files. /var includes
"transient and temporary" files.  However, I don't think this means
everything in /var is non-peristent. 

As far is I know SuSE and Solaris store apache data files in /usr/local.
Which makes also sense, as /usr can contain static and dynamic files.

An argument for using /home is the fact that www-data is a user and as
such it should have its home dir in /home.

Still, from a gut feeling, I prefer /var to /home.  Maybe we could
research in more depth the reasons why /var was chosen before we decide
on changing it?

> right now, i solve this by having symlinks from /var/www/servername to
> the homedirectory of the responsible person for the domain, so that
> the actual data reside on /home. but that's not the way debian handles
> this, and i am wondering just why?
> 
> why is debian apache making /var/www be the main directory, and why is
> debian apache not providing an easily extensible location for virtual
> domain data?
> 
> martin;  (greetings from the heart of the sun.)
>   \ echo mailto: !#^."<*>"|tr "<*> mailto:"; [EMAIL PROTECTED]
> -- 
> it said "needs windoze 98 or better," so i installed linux.



-- 

GPG Keyid 0x0FCD0EE2
GPG Fingerprint C2FF 6147 0ADB 1674 4096  2339 370F CBDF 0FCD 0EE2

fortune - print a random, hopefully interesting, adage:

Christmas time is here, by Golly;   Kill the turkeys, ducks and chickens;
Disapproval would be folly; Mix the punch, drag out the Dickens;
Deck the halls with hunks of holly; Even though the prospect sickens,
Fill the cup and don't say when...  Brother, here we go again.

On Christmas day, you can't get sore;   Relations sparing no expense'll,
Your fellow man you must adore; Send some useless old utensil,
There's time to rob him all the more,   Or a matching pen and pencil,
The other three hundred and sixty-four! Just the thing I need... how nice.

It doesn't matter how sincere   Hark The Herald-Tribune sings,
It is, nor how heartfelt the spirit;Advertising wondrous things.
Sentiment will not endear it;   God Rest Ye Merry Merchants,
What's important is... the price.   May you make the Yuletide pay.
Angels We Have Heard On High,
Let the raucous sleighbells jingle; Tell us to go out and buy.
Hail our dear old friend, Kris Kringle, So...
Driving his reindeer across the sky,
Don't stand underneath when they fly by!
-- Tom Lehrer


pgpKUTuKFTw83.pgp
Description: PGP signature


Re: virtual hosting in apache and file locations

2001-10-02 Thread Daniel Stone
On Tue, Oct 02, 2001 at 12:43:43PM +0200, martin f krafft wrote:
> also sprach Daniel Stone (on Tue, 02 Oct 2001 08:10:38PM +1000):
> > I think that a symlink from /var to /home is bad. Maybe if we stored it
> > under /home/www-data or such.
> 
> that's one possibility, although i am more in favor of uniting sites
> into single directory hierarchies. what's the big point of having
> documents in /var/www and below, but cgi's in /usr/lib/apache/cgi-bin?
> and manuals in /usr/share..., and logs in /var/log/apache?

Single directory would be nice, but I'm willing to bet that FHS has
dictated these braindead locations.

> i understand, there is the FHS, but a virtual site is a virtual site,
> in fact, any website is it's own site and doesn't really have anything
> to do with the host server except for a small number of cases.
> 
> i think that /home/www-data or /home/apache is a reasonable idea, but
> somehow you need to fuse allowing users to edit their own pages, and
> protecting the apache installation against fuckups - because a single
> user who moves the directory corresponding to the webpage will make
> apache fail to start the next time.

IMHO, /home/apache is out, because you then run into trouble adding a
user called "apache". If it's going to be in /home (and I'm still gunning
for /var/www, although slightly different, see below), it must be
/home/www-data. Anything else would impede creation of users.

> instead, i propose the following: any apache configuration only serves
> virtual sites, where the primary site (the actual server site) is the
> first, which means the default if no Host HTTP Request Header is
> transmitted. virtual hosts relying on Host headers bind to 0.0.0.0:80
> only, IP virtuals bind to that IP.

Yeah, this is what I suggested. If I had just worded it normally, as
opposed to somewhat of a full-on policy statement, this would've been
more clear. Sorry.

(I'm pretty clear on how apache(2) handles virtual hosts, etc, BTW).

> for every virtual site defined in apache's config (which i am
> currently reworking), there is one equinomial[1] directory under
> /home/apache/sites (chmod 2711, chown root.staff). e.g.:
> /home/apache/sites/pantsfullofunix.net and
> /home/apache/sites/debianplanet.org. permissions are then set
> according to who is administering the site, although i propose having
> an equinomial group for every site anyway, and 2775 permissions
> recursively . now, you can symlink out of a home directory, i.e. from
> ~madduck/web/pantsfullofunix.net to
> /home/apache/sites/pantsfullofunix.net.

Sounds pretty good to me. I would, however, have the setup as follows:
/var/www - container. anything here should be moved to default/htdocs
/var/www/default - symlink to the default vhost
/var/www/site.name/htdocs - web root for site.name (e.g.
debianplanet.org)
/var/www/site.name/logs - logs for site.name
/var/www/site.name/cgi-bin - cgi stuff for site.name

No disagreements with the permissions, and /var/www/site.name can be a
symlink if you want to (I currently have this exact setup running on a
few production servers myself).

> this pretty much ensures that when /home is up, apache will serve
> whatever is in these directories.
> 
> furthermore, one could create
> /home/apache/common/{img,scripts,cgi-bin,whatever}, which could be
> (script-)aliased as /cgi-pub, scripts-pub, /img-pub, /whatever-pub
> server wide, and could contain common CGIs like counters or guestbooks
> and whatever kind of junk the people want.

This is a very good idea - /var/www/common, tho?

> in addition, every /home/apache/sites/* directory has it's own
> cgi-bin, iff the owner so desires and the hostmaster allows it. this
> gives separate custom cgi control over each site while not limiting
> the cgi-pub access. very much the same approach can be taken with
> scripts, and even PHP capabilities and other stuff. all i am saying
> is:  is your friend!!! and you can use it the same way
> with no negative consequences if you are only serving one site.

Yeah, that's what I was proposing with
/usr/lib/cgi-bin/(default|site.name).

Virtual hosts are good. This should also allow us to nicely skirt around
FHS; AFAIK FHS makes no provision for virtual hosts. If we reintrepret
apache to having only virtual hosts, with one default host, then we can
say "aha, stuff FHS, we have virtual hosts. thpthpthpthpt".

> lastly, i propose (even though i have not been able to implement
> this), to give every single site directory a 0750 root.site
> subdirectory "log", in which the error and access logs for that site
> are placed. this much works for my server, but what i also want is one
> centralized logfile for all in /var/log/apache. this allows users
> access to their logs, it keeps /var/log/apache and files clean, and
> it's a perfect way to handle multiple sites, especially because
> apache's cron.daily knows how to rotate any logfile no matter where it
> is, and because such a convention all

let's move this thread (was Re: virtual hosting in apache and file locations)

2001-10-02 Thread martin f krafft
we have just founded an apache task force to work on long overdue
issues with apache, so let's continue this thread there, and not on
both lists. if you still have comments about my original post, go
ahead and post them here, otherwise hop on over to 

  https://lists.madduck.net/mailman/listinfo/debian-apache

and sign up, then post to [EMAIL PROTECTED] it's
subscriber-only, so sign up first!

if you do send something without signing up, don't resend it when you
signed up. i will still let valid posts pass!

martin;  (greetings from the heart of the sun.)
  \ echo mailto: !#^."<*>"|tr "<*> mailto:"; [EMAIL PROTECTED]
-- 
always remember you're unique, just like everyone else.


pgpFSWb3dq9zD.pgp
Description: PGP signature


Re: virtual hosting in apache and file locations

2001-10-02 Thread martin f krafft
also sprach Daniel Stone (on Tue, 02 Oct 2001 08:10:38PM +1000):
> I think that a symlink from /var to /home is bad. Maybe if we stored it
> under /home/www-data or such.

that's one possibility, although i am more in favor of uniting sites
into single directory hierarchies. what's the big point of having
documents in /var/www and below, but cgi's in /usr/lib/apache/cgi-bin?
and manuals in /usr/share..., and logs in /var/log/apache?

i understand, there is the FHS, but a virtual site is a virtual site,
in fact, any website is it's own site and doesn't really have anything
to do with the host server except for a small number of cases.

i think that /home/www-data or /home/apache is a reasonable idea, but
somehow you need to fuse allowing users to edit their own pages, and
protecting the apache installation against fuckups - because a single
user who moves the directory corresponding to the webpage will make
apache fail to start the next time.

instead, i propose the following: any apache configuration only serves
virtual sites, where the primary site (the actual server site) is the
first, which means the default if no Host HTTP Request Header is
transmitted. virtual hosts relying on Host headers bind to 0.0.0.0:80
only, IP virtuals bind to that IP.

for every virtual site defined in apache's config (which i am
currently reworking), there is one equinomial[1] directory under
/home/apache/sites (chmod 2711, chown root.staff). e.g.:
/home/apache/sites/pantsfullofunix.net and
/home/apache/sites/debianplanet.org. permissions are then set
according to who is administering the site, although i propose having
an equinomial group for every site anyway, and 2775 permissions
recursively . now, you can symlink out of a home directory, i.e. from
~madduck/web/pantsfullofunix.net to
/home/apache/sites/pantsfullofunix.net.

this pretty much ensures that when /home is up, apache will serve
whatever is in these directories.

furthermore, one could create
/home/apache/common/{img,scripts,cgi-bin,whatever}, which could be
(script-)aliased as /cgi-pub, scripts-pub, /img-pub, /whatever-pub
server wide, and could contain common CGIs like counters or guestbooks
and whatever kind of junk the people want.

in addition, every /home/apache/sites/* directory has it's own
cgi-bin, iff the owner so desires and the hostmaster allows it. this
gives separate custom cgi control over each site while not limiting
the cgi-pub access. very much the same approach can be taken with
scripts, and even PHP capabilities and other stuff. all i am saying
is:  is your friend!!! and you can use it the same way
with no negative consequences if you are only serving one site.

lastly, i propose (even though i have not been able to implement
this), to give every single site directory a 0750 root.site
subdirectory "log", in which the error and access logs for that site
are placed. this much works for my server, but what i also want is one
centralized logfile for all in /var/log/apache. this allows users
access to their logs, it keeps /var/log/apache and files clean, and
it's a perfect way to handle multiple sites, especially because
apache's cron.daily knows how to rotate any logfile no matter where it
is, and because such a convention allows script access to logs via
/home/apache/sites/*/log. here i propose that the directory is owned
by root and grouped to the site group so that the webmasters have
read-access to their logs, but noone else, which is all that you ever
need.

now, with this setup, which i have implemented on two productive
servers so far, administration is bloody simple, and it makes sense! a
virtual website does not have to melt in with the server FHS, it
*could* have it's own FHS instantiation, but there is no need or point
to log to /var/log (other than collectively), to serve from /var/www,
or to execute CGIs from /usr/lib.

lastly, to help other debian packages (like webalizer and others) to
switch to a new convention, /var/www could very well be a symlink to
/home/apache/sites/`hostname`.mydomain.com

[1] no, this isn't a word. but it should be. you get the idea...

> I think that it should remain that way, but hey, this is my main server:
> [EMAIL PROTECTED]:~% ls -l /var
> lrwxrwxrwx1 root root9 Jul  4 09:48 /var ->
> /home/var

uhm, daniel, are you, uhm, okay?
WHY?

martin;  (greetings from the heart of the sun.)
  \ echo mailto: !#^."<*>"|tr "<*> mailto:"; [EMAIL PROTECTED]
-- 
perl -le '$_="6110>374086;2064208213:90<307;55"; \
  tr[0->][ LEOR\!AUBGNSTY];print'


pgpn3pifazY6K.pgp
Description: PGP signature


Re: virtual hosting in apache and file locations

2001-10-02 Thread Daniel Stone
On Tue, Oct 02, 2001 at 10:27:49AM +0200, martin f krafft wrote:
> i always wondered just why debian apache puts the main homepage of a
> server into /var/www. /var isn't made for stuff that's persistens like
> a homepage! in addition, where do virtual hosts go? in general, once
> a virtual host is defined, one had better defined a virtual host for
> the primary hostname too so as to make apache work better (my
> experience). but as soon as server.mydomain.com and
> virtual.mydomain.com are both hosted by the same server, and are both
> virtual domains, they should technically be in the same hierarchy.

07:45PM|> why was /var/www chosen?
07:45PM| DanielS: FHS?
07:46PM| DanielS: not that im saying it makes sense. but thats
the reasoning.

Yes, this starts to get flaky once you get to virtual hosts.

> right now, i solve this by having symlinks from /var/www/servername to
> the homedirectory of the responsible person for the domain, so that
> the actual data reside on /home. but that's not the way debian handles
> this, and i am wondering just why?

I think that a symlink from /var to /home is bad. Maybe if we stored it
under /home/www-data or such.

Actually, this is my proposal (to be common policy for apache and
apache2, but I'm obviously not speaking for Thom):

The default web root will be /var/www/default. There must be no files in
/var/www; as a temporary measure, a daily cronjob may be implemented to
move all files from /var/www to /var/www/default. The same applies for
cgi-bin - the default site has CGIs in /usr/lib/cgi-bin/default, and, as
a temporary measure, a daily cronjob may be implemented to move all
files from /usr/lib/cgi-bin to /usr/lib/cgi-bin/default. Logs should be
in /var/log/apache(2)/default (the 2 obviously only applies for
apache2).

Web documents for virtual hosts should be installed as
/var/www/host.name (e.g. /var/www/www.debianplanet.org). This directory
may or may not be a symbolic link anywhere else. CGIs for virtual hosts
should follow the same format - /usr/lib/cgi-bin/host.name. The same
also applies for logs - /var/log/apache(2)/default. If using virtual 
hosts, there should be directories of this format for all hosts, and 
/var/www/default, /usr/lib/cgi-bin/default and
/var/log/apache(2)/default should be symbolic links to the relevant
directories.


Whaddya think?

Oh, and while I'm at it, please move the apache manual to
/usr/share/apache/manual, and have an Alias /manual/, or such. Or maybe
even a /var/www/default/manual alternative? (I believe Thom implemented
this, but it's on his laptop *sigh*). Currently apache2 has an alias.
This stops conflicts.

Should we also standardise the default configuration to produce a single
combined log by default? (If it does this already, ignore me).

> why is debian apache making /var/www be the main directory, and why is
> debian apache not providing an easily extensible location for virtual
> domain data?

I think that it should remain that way, but hey, this is my main server:
[EMAIL PROTECTED]:~% ls -l /var
lrwxrwxrwx1 root root9 Jul  4 09:48 /var ->
/home/var

I think putting the "may or may not be a symlink" bit basically says,
"make it a symlink if you want". IMHO putting it in /home isn't The
Right Thing, but there you go. What does everyone else think?

:) d

-- 
Daniel Stone<[EMAIL PROTECTED]>
 Booting... /vmunix.el


pgpec6hSkki1d.pgp
Description: PGP signature


virtual hosting in apache and file locations

2001-10-02 Thread martin f krafft
i always wondered just why debian apache puts the main homepage of a
server into /var/www. /var isn't made for stuff that's persistens like
a homepage! in addition, where do virtual hosts go? in general, once
a virtual host is defined, one had better defined a virtual host for
the primary hostname too so as to make apache work better (my
experience). but as soon as server.mydomain.com and
virtual.mydomain.com are both hosted by the same server, and are both
virtual domains, they should technically be in the same hierarchy.

right now, i solve this by having symlinks from /var/www/servername to
the homedirectory of the responsible person for the domain, so that
the actual data reside on /home. but that's not the way debian handles
this, and i am wondering just why?

why is debian apache making /var/www be the main directory, and why is
debian apache not providing an easily extensible location for virtual
domain data?

martin;  (greetings from the heart of the sun.)
  \ echo mailto: !#^."<*>"|tr "<*> mailto:"; [EMAIL PROTECTED]
-- 
it said "needs windoze 98 or better," so i installed linux.


pgpwSOEqYOSQ4.pgp
Description: PGP signature


Re: Apache and Virtual Hosting

2001-05-15 Thread will trillich
On Mon, May 14, 2001 at 11:02:27PM -0400, Jason Healy wrote:
> At 989895234s since epoch (05/14/01 22:53:54 -0400 UTC), Scott Raun wrote:
> > I'm Apache 1.3 on potato.
> > 
> > I can't get name-based virtual hosting to work.
> 
> I too, suffered from this.  I'm not sure if you're having the same problem
> that I was, but it turned out that potato uses Apache 1.3.9, and the "new"
> virtualhosting syntax came about in 1.3.14 or so.  So it could very well be
> that the slightly outdated version of apache that ships with potato doesn't
> understand your virtualhost rules.
> 
> I hit my head against the wall for *days* before finding out that little
> tidbit, so make sure that your virtualhost rules are compliant with apache
> 1.3.9 before you try much else.

i'm using potato-friendly apache-perl which is version 1.3.9:

% apache -v
Server version: Apache/1.3.9 (Unix) Debian/GNU
Server built:   Apr 30 2000 12:54:24

% dpkg -l apache\*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name   VersionDescription
+++-==-==-
rc  apache 1.3.9-13.1 Versatile, high-performance HTTP server
ii  apache-common  1.3.9-13.2 Support files for all Apache webservers
ii  apache-dev 1.3.9-13.2 Apache webserver development kit
pn  apache-doc  (no description available)
un  apache-modules  (no description available)
ii  apache-perl1.3.9-13.1-1.2 Versatile, high-performance HTTP server with

and i've got a handful of virtual hosts, working just like
downtown--within the macro construct, no less:

NameVirtualHost ##.##.##.##


  # same ip number as in "NameVirtualHost":
  
ServerAdmin [EMAIL PROTECTED]
DocumentRoot $p
# HTTP/1.1 header "Host:" must match "$h" or "www.$h"
ServerName www.$h
ServerAlias $h
UserDir disabled
DirectoryIndex index.html index.cgi


AllowOverride none
Options Indexes Includes
order allow,deny
allow from all

IndexIgnore .??* *~ *# HEADER* README* RCS

ForceType text/plain

#refers to an errordocument macro:
Use SnagErrors
  


(i think i had to do something to 'wake up' the macro facility,
but dang if i can recall what...)

said macros are called thusly, further down in httpd.conf:

Use Virtual "easydxftype.serensoft.com" "/var/www/bryce"
Use Virtual "dontUthink.com" "/var/www/puz"
Use Virtual "flint.dontUthink.com" "/var/www/flint"

(and you'd need a DNS server to back up your naming instances, of
course...)

-- 
DEBIAN NEWBIE TIP #15 from Will Trillich <[EMAIL PROTECTED]> 
:
Is there a good place to learn snarky PERL TECHNIQUES? One of
my favorites is http://webtechniques.com, where Randall Schwartz
contributes a monthly sample, explaining line-by-line what his
code does, and why. (Look under "Programming with Perl" in the
archives.)

Also see http://newbieDoc.sourceForge.net/ ...



Re: Apache and Virtual Hosting

2001-05-14 Thread ktb
On Mon, May 14, 2001 at 09:53:54PM -0500, Scott Raun wrote:
> I'm Apache 1.3 on potato.
> 
> I can't get name-based virtual hosting to work.
> 
> I just browsed the archive - I've got the NameVirtualHost IP-address in
> place. I've had the local Linux User Group mailing list look at my config -
> they've had a number of thoughts, none of which have panned out.
> 
> Every time I go to my default domain - fireopal.org - I get the
> fireopal.org index.html. Every time I go to the other domain - ytilaer.com
> - I get the fireopal.org index.html.
> 
> Here's the Virtual Host section of my httpd.conf:
> 
> :NameVirtualHost 209.134.132.36
> :
> :
> :ServerName fireopal.org
> :ServerAlias fireopal.org *.fireopal.org
> :ServerAdmin [EMAIL PROTECTED]
> :UserDir public_html
> :DocumentRoot /var/www_test/host.fireopal.org
> :ErrorLog /var/log/apache/error.log
> :
> :
> :
> :ServerName ytilaer.com
> :ServerAlias ytilaer.com *.ytilaer.com
> :ServerAdmin [EMAIL PROTECTED]
> :UserDir disabled
> :DocumentRoot /var/www_test/host.ytilaer.com
> :ErrorLog /var/log/apache/host.ytilaer.com-error.log
> :TransferLog /var/log/apache/host.ytilaer.com-access.log
> :
> 

I don't know for sure about this but mine works and the differences
between the two are -
NameVirtualHost 209.134.132.36:80
   ^^

  ^^
ServerAlias fireopal.org
ServerAlias www.fireopal.org

I have the ServerAlias lines on two separate lines.  I didn't try the
glob.
hth,
kent
-- 
 From seeing and seeing the seeing has become so exhausted
 First line of "The Panther" - R. M. Rilke




Re: Apache and Virtual Hosting

2001-05-14 Thread Jason Healy
At 989895234s since epoch (05/14/01 22:53:54 -0400 UTC), Scott Raun wrote:
> I'm Apache 1.3 on potato.
> 
> I can't get name-based virtual hosting to work.

I too, suffered from this.  I'm not sure if you're having the same problem
that I was, but it turned out that potato uses Apache 1.3.9, and the "new"
virtualhosting syntax came about in 1.3.14 or so.  So it could very well be
that the slightly outdated version of apache that ships with potato doesn't
understand your virtualhost rules.

I hit my head against the wall for *days* before finding out that little
tidbit, so make sure that your virtualhost rules are compliant with apache
1.3.9 before you try much else.

Jason
--
Jason Healy| [EMAIL PROTECTED]
LogN Systems   |   http://www.logn.net/



Apache and Virtual Hosting

2001-05-14 Thread Scott Raun
I'm Apache 1.3 on potato.

I can't get name-based virtual hosting to work.

I just browsed the archive - I've got the NameVirtualHost IP-address in
place. I've had the local Linux User Group mailing list look at my config -
they've had a number of thoughts, none of which have panned out.

Every time I go to my default domain - fireopal.org - I get the
fireopal.org index.html. Every time I go to the other domain - ytilaer.com
- I get the fireopal.org index.html.

Here's the Virtual Host section of my httpd.conf:

:NameVirtualHost 209.134.132.36
:
:
:ServerName fireopal.org
:ServerAlias fireopal.org *.fireopal.org
:ServerAdmin [EMAIL PROTECTED]
:UserDir public_html
:DocumentRoot /var/www_test/host.fireopal.org
:ErrorLog /var/log/apache/error.log
:
:
:
:ServerName ytilaer.com
:ServerAlias ytilaer.com *.ytilaer.com
:ServerAdmin [EMAIL PROTECTED]
:UserDir disabled
:DocumentRoot /var/www_test/host.ytilaer.com
:ErrorLog /var/log/apache/host.ytilaer.com-error.log
:TransferLog /var/log/apache/host.ytilaer.com-access.log
:

I discovered something interesting on my last attempt to get this working -
no matter what I do, apache is still serving up /var/www. I discovered this
when I moved everything out of /var/www into /var/www/host.fireopal.org -
all my pages disappeared. So, I recreated /var/www, and created
/var/www_test/host.fireopal.org and /var/www_test/host.ytilaer.com. I then
re-wrote the index.html files in www_test, so I could identify which one
I'm getting.

I'm always getting the one in /var/www.

I don't have any "DocumentRoot /var/www" in my httpd.conf at all!

Any hints?

Replies directly to [EMAIL PROTECTED] would be much appreciated!

-- 

Okay, who stopped the payment on my reality check?

Scott Raun - [EMAIL PROTECTED]



Re: Apache virtual hosting

2000-03-29 Thread Robert Varga


Not really like that. Don't forget there are hosts out there which have
only one ip-address, so they must use name-based virtual hosting. For this
they must configure their only ip-address as NameVirtualHost. After this
the documentroot in srm.conf is ignored. All ip-names which the
server have, should appear in a VirtualHost section in a ServerName or
ServerAlias directive. If it does not, then the default virtualhost is
served for it, which is the first VirtualHost section parsed.

Of course if you use mass virtual hosting (vhost module), then the
operation is as it is described in its documentation.

Robert Varga

On Mon, 27 Mar 2000, Daniel Yang wrote:

> normally, you would have main web server and then virtual web servers.
> Here is what it looks like in the httpd.conf
> 
> #setup main web server
> DocumentRoot /www/mainweb
> ServerName www.mainweb.com
> 
> #then set up virtual web server (e.g. IP based)
> 
> DocumentRoot /www/virtualweb1
> Servername www.virtualweb1.com
> 
> 
> #if you want, the second virtual web server
> 
> DocumentRoot /www/virtualweb2
> Servername www.virtualweb2.com
> 
> 
> So the answer is obvious.
> Daniel
> 
> -Orig
> inal Message-
> From: Dzuy M. Nguyen <[EMAIL PROTECTED]>
> To: Debian User Mailing List 
> Date: Monday, March 27, 2000 2:32 PM
> Subject: Apache virtual hosting
> 
> 
> If I figure my apache web server to allow virtual hosts,
> does the 'DocumentRoot' directive in the main server
> configuration area of httpd.conf get ignored?
> 
> By setting up the virtual hosts, do all my domains
> have to be listed in:
> 
> 
> 
> 
> And is this now the default directives the all the
> DocumentRoot?
> 


Re: Apache virtual hosting

2000-03-28 Thread Daniel Yang




normally, you would have main web 
server and then virtual web servers. Here is what it looks like in the 
httpd.conf
 
#setup main web server
DocumentRoot /www/mainweb
ServerName www.mainweb.com
 
#then set up virtual web server (e.g. IP 
based)

DocumentRoot /www/virtualweb1
Servername www.virtualweb1.com

 
#if you want, the second virtual web 
server


DocumentRoot /www/virtualweb2
Servername www.virtualweb2.com

 
So the answer is obvious.
Daniel
 

-Orig
inal Message-From: Dzuy 
M. Nguyen <[EMAIL PROTECTED]>To: 
Debian User Mailing List <debian-user@lists.debian.org>Date: 
Monday, March 27, 2000 2:32 PMSubject: Apache virtual 
hosting
If I figure my apache web server to allow 
virtual hosts,
does the 'DocumentRoot' directive in the main 
server
configuration area of httpd.conf get 
ignored?
 
By setting up the virtual hosts, do all my 
domains
have to be listed in:
 


 
And is this now the default directives the all 
the
DocumentRoot?


Apache virtual hosting

2000-03-27 Thread Dzuy M. Nguyen



If I figure my apache web server to allow virtual 
hosts,
does the 'DocumentRoot' directive in the main 
server
configuration area of httpd.conf get 
ignored?
 
By setting up the virtual hosts, do all my 
domains
have to be listed in:
 


 
And is this now the default directives the all 
the
DocumentRoot?


Virtual hosting resource wanted

1999-08-21 Thread André Bell
At http://www.flux.org/linux/mooney.html I came across all these Howto's
for virtual hosting on apache: 

. http://www.apache.org/docs/vhosts/ip-based.html
. http://www.apache.org/docs/vhosts/name-based.html
. http://metalab.unc.edu/LDP/HOWTO/mini/IP-Alias.html
. http://www.apacheweek.com/features/vhost.html
. http://homepages.thespere.com/~dlp/TwoServers/
. http://www.nvg.ntnu.no/linux/HOWTO/WWW-HOWTO-7.html

Any idea if there is a good one-book resource for this that I can carry
around with me so I can figure out how to control such things as automated
new user validation and account setup, automated configuring and installing
standard cgi's to their cgi-bin, automated web space allocation/limits, etc
etc.?  

I'd like to avoid having to manually create accounts for new users and
avoid having to manually edit, copy, and set file permissions to cgi's over
and over again each time a new account is created.  I'd rather this as well
as account creation/management be automated as well -- just like signing up
online for any paid ISP account.  Account validation and setup is automated
on geocities, hypermart.net, thegrid.net, etc etc.  I want to accomplish
the same.

Any ideas of a good resource?

Thanks!


Re: apache virtual hosting

1999-08-11 Thread Bill West
On Tue, Aug 10, 1999 at 12:36:17PM -0700, Robert Jones wrote:
> 
> What version of Apache were you using on Red Hat?  Since 1.3, you need to
> explicitly define IP addresses you want to have named-based virtual hosts on
> with the 'NameVirtualHost' directive -- if you were on 1.2, and upgraded to
> 1.3, this could be your problem.
> 
The lack of having the directive NameVirtualHost in httpd.conf was the
culprit. Thanks to all who responded. One gentleman sent me cut from his
configs but I had the bad luck of having my son accidently pull the power
cord from the UPS and lost that mail so I can't reply directly back to
him to thank him.

-- 
Bill West
Conroe TX
[EMAIL PROTECTED]
http://synergy.linux-help.org

finger [EMAIL PROTECTED] for public pgp key

**
Linux = The choice of a GNU generation
**


Re: apache virtual hosting

1999-08-10 Thread Robert Jones
Quoth Bill West on 10 Aug, 1999:

> Strange problem here. I just moved on of my machines at work to debian from
> redhat. The apache server on that machine was doing virtual hosting of
> several sites using the same IP via VirtualName directives. Worked very well
> in fact. Now the debian apache will not do the same thing for some reason.
> When you try and go to one of the virtual hosts you always end up looking at
> the main page and not the virtual hosts page. I've even put the httpd.conf
> and srm.conf files from the working redhat server in place with no luck.
> 
> Anyone run into this type thing before? Or know what I can look for. Could
> very well be that I've goofed in the config somewhere and havn't found it yet.

What version of Apache were you using on Red Hat?  Since 1.3, you need to
explicitly define IP addresses you want to have named-based virtual hosts on
with the 'NameVirtualHost' directive -- if you were on 1.2, and upgraded to
1.3, this could be your problem.


apache virtual hosting

1999-08-10 Thread Bill West
Strange problem here. I just moved on of my machines at work to debian from
redhat. The apache server on that machine was doing virtual hosting of
several sites using the same IP via VirtualName directives. Worked very well
in fact. Now the debian apache will not do the same thing for some reason.
When you try and go to one of the virtual hosts you always end up looking at
the main page and not the virtual hosts page. I've even put the httpd.conf
and srm.conf files from the working redhat server in place with no luck.

Anyone run into this type thing before? Or know what I can look for. Could
very well be that I've goofed in the config somewhere and havn't found it yet.

-- 
Bill West
Conroe TX
[EMAIL PROTECTED]
http://synergy.linux-help.org

finger [EMAIL PROTECTED] for public pgp key

**
Linux = The choice of a GNU generation
**


Re: sendmail virtual hosting

1999-07-21 Thread A. M. Varon
On Wed, 21 Jul 1999, Robert Varga wrote:

> I use slink with sendmail on one of my machines doing this.
> 
> First of all, put all virtualhosts in the /etc/mail/sendmail.cw file, one
> host in one line. This is needed for sendmail to accept mail for the host.
> You need to restart sendmail for this to take effect, but you will need to
> restart it later anyway, so don't restart it for now.

< snipped>

Thanks Robert! virtual hosting now works.

Proves once again of a very good tech support for Debian! :) 

regards,

= = Andre M. Varon  Lasaltech Incorporated
= =  == Technical Head  Fax-Tel: (034)435-0836
= == =
=  = =  E-mail  : [EMAIL PROTECTED]
 =  WebPage : http://andre.lasaltech.com



Re: sendmail virtual hosting

1999-07-21 Thread Robert Varga


On Wed, 21 Jul 1999, A. M. Varon wrote:

> Hi,
> 
> Anybody has experience with sendmail virtual hosting on a
> Debian slink/potato? Any tips/tricks to share?

I use slink with sendmail on one of my machines doing this.

First of all, put all virtualhosts in the /etc/mail/sendmail.cw file, one
host in one line. This is needed for sendmail to accept mail for the host.
You need to restart sendmail for this to take effect, but you will need to
restart it later anyway, so don't restart it for now.

You need to reconfigure sendmail to use genericstable and virtual user
table features.

You can do it the following way, if you have not already done it:

These two lines should be in /etc/mail/sendmail.mc:


FEATURE(`virtusertable', `hash /etc/mail/virtualusertable')dnl
FEATURE(`genericstable', `hash /etc/mail/genericstable')dnl   
GENERICS_DOMAIN_FILE(`/etc/mail/sendmail.cG')dnl

(I think the last line is there by default.)

After this you need to run sendmailconfig. It recreates sendmail.cf. For
me it also puts in an error, for which I need to edit the generated
sendmail.cf manually, to comment out a line for which it generates an
error upon restarting sendmail. But it may be due to the fact that my
machine had exim as well, and I installed sendmail upon it, instead of
removing exim before.

Anyway, after running sendmailconfig, if you restart sendmail, it will
probably give an error message complaining about not being able to find
/etc/mail/virtualusertable.db and /etc/mail/genericstable.db.

Ignore this for a moment, or don't restart.

Create a script containing:

makemap hash /etc/mail/virtualusertable < /etc/mail/virtualusertable
makemap hash /etc/mail/genericstable < /etc/mail/genericstable

This will be used to rebuild the binary databases from the text source of
them. These databases can be used to provide mapping for addresses to
users/forward addresses. 
The databases are the .db files sendmail complains about not being able to
find.

The format of these files are:

virtualusertable:



genericstable:




Both files should contain lines only of the given structure.  is a
TAB character (\t)

The virtualusertable contains the email address to look for in the first
column. If an email is arriving for this address, then it takes the action
defined in the second column. The action can be a username for the message
to be delivered to. It can be an email address for the message to be
forwared to. It can be an alias name as well. And probably it can be a
program delivery line, or mailbox file in procmail syntax as well,
although I am not sure about this. 


The genericstable contains usernames in the first column. The second
column contains the email address to which the address is rewritten to.
Sendmail rewrites all addresses according to this, if the domain of the
original address is in /etc/mail/sendmail.cG and the user is in the
genericstable file.

So, create these files (/etc/mail/virtualusertable and
/etc/mail/genericstable) (or at least touch them). 

After it, run the script creating the binary databases.

Now, you can restart sendmail, and it should be working.

After altering the two tables you need to rerun the script creating the
binary databases, but you don't need to restart sendmail. 

However if you add to /etc/mail/sendmail.cw or /etc/mail/sendmail.cG then
you do need to restart sendmail, I think.

For using hashtables, I think you need libgdbmg1 package to be installed.
Probably it is installed anyway.

Good luck,

Robert Varga


sendmail virtual hosting

1999-07-21 Thread A. M. Varon
Hi,

Anybody has experience with sendmail virtual hosting on a
Debian slink/potato? Any tips/tricks to share?

Thanks,

= = Andre M. Varon  Lasaltech Incorporated
= =  == Technical Head  Fax-Tel: (034)435-0836
= == =
=  = =  E-mail  : [EMAIL PROTECTED]
 =  WebPage : http://andre.lasaltech.com


Re: IP less virtual hosting FTP daemon

1998-08-20 Thread fantomas
-> > > Is there such a thing? I have a lot domains that I host, but only one IP.
-> > 
-> > No. Proftpd can do IP based virtual hosting
-> 
-> I know, ProFTPd is what I'm currently using, but that won't do...

maybe you should set iit up or upgrade. Anyway, FTP protocol does not allow
ip-less virtual hosting as http protocol does... that's why you can't do
something like that...
-- 
 Matus "fantomas" Uhlar, sysadmin at NETLAB+ Kosice, Slovakia
 BIC coord for *.sk; admin of netlab.irc.sk; co-admin of irc.felk.cvut.cz


Re: IP less virtual hosting FTP daemon

1998-08-20 Thread Turbo Fredriksson
Jason Gunthorpe <[EMAIL PROTECTED]> wrote:

> On 19 Aug 1998, Turbo Fredriksson wrote:
> 
> > Is there such a thing? I have a lot domains that I host, but only one IP.
> 
> No. Proftpd can do IP based virtual hosting

I know, ProFTPd is what I'm currently using, but that won't do...

-- 
---
 Turbo __ _ Debian GNU Unix _IS_ user friendly - it's just 
 ^/ /(_)_ __  _   ___  __  selective about who its friends are 
 / / | | '_ \| | | \ \/ /  papadoc.nocrew.org  
  _ /// / /__| | | | | |_| |>  <  Turbo Fredriksson[EMAIL PROTECTED]
  \\\/  \/_|_| |_|\__,_/_/\_\ Surrey/B.C./Canada  (604)572-3523
Debian Certified Linux Developer  PGP#788CD1A9   www5.tripnet.se/~turbo
--- PGP:  B7 92 93 0E 06 94 D6 22  98 1F 0B 5B FE 33 A1 0B 
-- 
explosion Ortega cracking NSA Peking Marxist [Hello to all my fans in
domestic surveillance] ammunition Cocaine DES Delta Force Mossad
domestic disruption plutonium Panama


pgpGPIRuklKb8.pgp
Description: PGP signature


Re: IP less virtual hosting FTP daemon

1998-08-20 Thread Jason Gunthorpe

On 19 Aug 1998, Turbo Fredriksson wrote:

> Is there such a thing? I have a lot domains that I host, but only one IP.

No. Proftpd can do IP based virtual hosting
 
> Nether proftpd or wu-ftpd-academ can handle this... And I know of only one
> web server that do (which I have runned happily for over a year), and that's
> Roxen... But I need a FTPd that can handle this to...

Actually apache does this too, and I think boa might as well. Works great,
that's how www.debian.org is run :>

Jason


IP less virtual hosting FTP daemon

1998-08-20 Thread Turbo Fredriksson
Is there such a thing? I have a lot domains that I host, but only one IP.

Nether proftpd or wu-ftpd-academ can handle this... And I know of only one
web server that do (which I have runned happily for over a year), and that's
Roxen... But I need a FTPd that can handle this to...

PS. Please Cc to me, since I'm not on debian-user[s]...


-- 
---
 Turbo __ _ Debian GNU Unix _IS_ user friendly - it's just 
 ^/ /(_)_ __  _   ___  __  selective about who its friends are 
 / / | | '_ \| | | \ \/ /  papadoc.nocrew.org  
  _ /// / /__| | | | | |_| |>  <  Turbo Fredriksson[EMAIL PROTECTED]
  \\\/  \/_|_| |_|\__,_/_/\_\ Surrey/B.C./Canada  (604)572-3523
Debian Certified Linux Developer  PGP#788CD1A9   www5.tripnet.se/~turbo
--- PGP:  B7 92 93 0E 06 94 D6 22  98 1F 0B 5B FE 33 A1 0B 
-- 
Rule Psix quiche Semtex class struggle munitions [Hello to all my fans
in domestic surveillance] AK-47 strategic Kennedy Ft. Bragg South
Africa Albanian Uzi Khaddafi supercomputer


pgphJIpbftd76.pgp
Description: PGP signature


Apache non-IP based Virtual Hosting

1997-08-21 Thread Matthew Tebbens

Has anyone converted to/installed Apache non-IP based Virtual Hosting ?
Please e-mail me, I just had a few basic questions..

Thanks,
Matthew


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: Virtual Hosting

1996-12-12 Thread Todd T. Fries
the Edward Blevins writes:
> On Mon, 9 Dec 1996, CoB SysAdmin wrote:
> > Good thing, too. We've got enough IP-space cramping as it is.
> Agreed!

Um ipv6 anyone?   Read the specs.  Our little 32bit ip pool
is about to get a 96bit boost.  (technically 65bits when you
consider that is what they are allocating for ip addresses
that mean a single host).  Before we run out of 32bit ips, to boot.

Supposedly that is 1,000+ ip's per square meter of surface area of
the planet.

So what happens when we go into space?
-- 
-- Todd T. Fries .. finger [EMAIL PROTECTED] for PGP public key
PGP fingerprint = B6 3B 70 46 BC 0F 8C DD  14 D4 C7 D1 47 F6 23 FA


pgpJlKlXWGnsV.pgp
Description: PGP signature


Re: Virtual Hosting

1996-12-09 Thread the Edward Blevins


On Mon, 9 Dec 1996, CoB SysAdmin wrote:

> I should like to mention at this point that there's supposed to be some
> movement toward a convention of the browser notifying the server of what
> host *name* it looked up to get there. So, you could have all the names
> go to one IP and the browsers would say "I was trying to connect to 
> www.one-of-your-clients.com", and the server would give them the proper
> page.
> 
> Apache claims to support this already and I think they said that NS 3.0 and
> IE 3.0 do as well.

I can confirm that it works well with the combination of Apache and NS3.0,
since I am running Linux, I haven't got a chance to test it with MSIE. I
assume Mosaic, Arena, Lynx, et all don't support this, but I'd love to
hear otherwise. 


> 
> Good thing, too. We've got enough IP-space cramping as it is.

Agreed!

--
the Edward Blevins
[EMAIL PROTECTED]


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]


Re: Virtual Hosting

1996-12-09 Thread Brad Roberts
> I should like to mention at this point that there's supposed to be some
> movement toward a convention of the browser notifying the server of what
> host *name* it looked up to get there. So, you could have all the names
> go to one IP and the browsers would say "I was trying to connect to 
> www.one-of-your-clients.com", and the server would give them the proper
> page.
> 
> Apache claims to support this already and I think they said that NS 3.0 and
> IE 3.0 do as well.
> 
> Good thing, too. We've got enough IP-space cramping as it is.

This is one of many changes in the HTTP 1.1 spec atleast some of which is
supported by NS and IE 3.0, and apache 1.1.x.  (Don't strangle me if the
version numbers are a little off.. things change so quick these days I
have trouble keeping up).


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]


Re: Virtual Hosting

1996-12-09 Thread Philippe Troin

On Sun, 08 Dec 1996 14:50:56 EST [EMAIL PROTECTED] wrote:

> Excuse my ignorance, but what is a virtual host? (and what would be the
> advantages to having one?)

A virtual host is a supplemental name attached to a machine. Typically ISP 
which host web services (www.yourcompany.com) don't have a machine per domain 
and use virtual hosts to provide all the various web services on a single 
server.
For this, you need to attach several names to the same IP address (trivial with 
DNS), and have servers which can distinguish between the various names of the 
same interface. Packets to various domains/addresses will all arrive on the 
same IP address aaa.bbb.ccc.ddd, and the server must know how this IP address 
was called (www.yourcompany.com).

Phil.



--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]


Re: Virtual Hosting

1996-12-08 Thread tomk%westgac3
Fundamental writes:
> 
[snip]
> Now, what else do i have to do to get this virtual host to work on my
> machine?  IF anyone has some advice or can point me in the right direction
> for a HowTO, id much apprecaiate it:)
[snip]

Excuse my ignorance, but what is a virtual host? (and what would be the
advantages to having one?)

-- 
-= Sent by Debian Linux =-
Thomas Kocourek  KD4CIK
[EMAIL PROTECTED]


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]


Re: Virtual Hosting

1996-11-26 Thread Andrew Y Ng
-BEGIN PGP SIGNED MESSAGE-

On Tue, 26 Nov 1996, Fundamental wrote:
> Now, what else do i have to do to get this virtual host to work on my
> machine?  IF anyone has some advice or can point me in the right direction
> for a HowTO, id much apprecaiate it:)

hmm... u have a lot of questions do u  :)

well, u have to get a your DNS to recognize your new hostname; u probably
don't have your own DNS, but if u do, just edit the .db or localhost.rev and
add a CNAME of that host to an existing host.

u cannot just "make" a hostname... contact the ppl who runs the nameserver
of ur domain to get the virtual host recognized.

I am running NetBSD and Apache, and I have a couple virtual hosts under
Ngbert.org.

don't know if this helps or not, coz it seemed like u dunno what u'r doing.
:)

/ayn

-BEGIN PGP SIGNATURE-
Version: 2.6.2

iQCVAwUBMppy5p6qvWJYgw1hAQFkewQAsjZOySymAK6DquyaECDiG4MYeHFPIUPZ
N8lR3/VhM8pbrz1jaaH+OqXBVc7ZxXm2qZL4QGUZErDxQyqbk34wsJ2Hcd60ETKT
yCbGWleovmV3bQfeFNPINuWKxqqrxCHdq9uB+EW/asdbwrlhZeAkEiuEWzhE+71J
JfwPldSBJmg=
=1RI+
-END PGP SIGNATURE-

--
Andrew Y Ng <[EMAIL PROTECTED]> http://andrew.Ngbert.org
Carnegie Mellon University; ECE major, Music minor
campus ph: 412/862-2836;  voice mail: 412/268-6700 x30027
talk: finger [EMAIL PROTECTED] for online status.
finger [EMAIL PROTECTED] for more info,
such as my public key, geekcode, snail address, etc.

NGBERT!  http://www.Ngbert.org



--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]


Virtual Hosting

1996-11-26 Thread Fundamental
Hey all.  Im running Debian Linux 1.1 and apache 1.1.1.  Ive added this to
the bottom of my httpd.conf


ServerName  www.b2.com.au
ServerAdmin [EMAIL PROTECTED]
DocumentRoot/web/docs/b2/
ErrorLoglogs/b2.com.au-error.log
TransferLog logs/b2.com.au-access.log

   

Now, what else do i have to do to get this virtual host to work on my
machine?  IF anyone has some advice or can point me in the right direction
for a HowTO, id much apprecaiate it:)

Sahua,

- mIcHaEl


  ///\  The Australian Internet Company
  c-00  ISP par Excellence
  \  >  http://www.electric-rain.net/   (mine)
  |\_-  http://www.aic.net.au/  (not mine)
  \ /
   . 

   "On the Plains of Hesitation bleach the bones of countless millions 
who,
at the dawn of victory, sat down to wait and waiting died."  
-G.W Cecil/Adlai 
Stevenson.


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]