cgi-bin directory under home/user/public_html

2003-07-13 Thread Nestor R. Mazza



Hi 
 
My server is 
Debian Woody 3.0r1
Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.1.2 
mod_perl/1.26
 
All the scripts works fine under original directories but 
now I want to put the user's scripts under 
/home/user/public_html/cgi-bin ...
At first I put   
/home/bodegonweb/public_html/cgi-bin/test-cgi  the same script that works 
fine under /usr/lib/cgi-bin
 
I have red the Apache Documentation but until today I 
couldn't get to works fine ...
 
Apache documentation says 

There are many ways to give each user directory a cgi-bin directory such that 
anything requested as http://example.com/~user/cgi-bin/program will 
be executed as a CGI script. Two alternatives are:

  Place the cgi-bin directory next to the public_html directory: 
  
ScriptAliasMatch ^/~([^/]*)/cgi-bin/(.*) 
/home/$1/cgi-bin/$2 
  Place the cgi-bin directory underneath the public_html directory: 
  
Options 
ExecCGISetHandler 
cgi-script 
If you are using suexec, the first technique will not work because CGI 
scripts must be stored under the public_html 
directory.
I have used the second option under the virtualhost of the 
user  
 
## Dominio 
bodegonweb.com.ar#
 
    ServerAdmin [EMAIL PROTECTED]    ServerName www.bodegonweb.com.ar    DocumentRoot 
/home/bodegonweb/public_html
  Options 
ExecCGISetHandler cgi-script  
 
   #    ErrorLog 
logs/host.some_domain.com-error.log#    CustomLog 
logs/host.some_domain.com-access.log common 


I'll apprecite your cooperation Regards Nestor 
Mazza [EMAIL PROTECTED]



Re: cgi-bin directory under home/user/public_html

2003-07-13 Thread Jason Lim

- Original Message - 
From: "Nestor R. Mazza" <[EMAIL PROTECTED]>
To: "DEBIAN debian-isp" <[EMAIL PROTECTED]>
Sent: 13 July, 2003 11:06 PM
Subject: cgi-bin directory under home/user/public_html


Hi

My server is 
Debian Woody 3.0r1
Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.1.2 mod_perl/1.26

All the scripts works fine under original directories but now I want to
put the user's scripts under /home/user/public_html/cgi-bin ...

At first I put   /home/bodegonweb/public_html/cgi-bin/test-cgi  the
same script that works fine under /usr/lib/cgi-bin

I have red the Apache Documentation but until today I couldn't get to
works fine ...

Apache documentation says 

There are many ways to give each user directory a cgi-bin directory such
that anything requested as http://example.com/~user/cgi-bin/program will
be executed as a CGI script. Two alternatives are:

  1.. Place the cgi-bin directory next to the public_html directory:
ScriptAliasMatch ^/~([^/]*)/cgi-bin/(.*) /home/$1/cgi-bin/$2
  2.. Place the cgi-bin directory underneath the public_html directory:

Options ExecCGI
SetHandler cgi-script

If you are using suexec, the first technique will not work because CGI
scripts must be stored under the public_html directory.

I have used the second option under the virtualhost of the user 

#
# Dominio bodegonweb.com.ar
#


ServerAdmin [EMAIL PROTECTED]
ServerName www.bodegonweb.com.ar
DocumentRoot /home/bodegonweb/public_html
  
Options ExecCGI
SetHandler cgi-script
  

#ErrorLog logs/host.some_domain.com-error.log
#CustomLog logs/host.some_domain.com-access.log common



==
Unfortunately, if you want to use suexec, you'll need to recompile it to
allow /home/*/public_html/cgi-bin/ otherwise it won't run.

There are docs on this common issue. Google is your friend.


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



Default Apache 404 for all sites

2003-07-13 Thread Jason Lim
Hi All,

While not specifically Debian, I'm sure you guys figured this one out ages
ago.

In Apache, I know you can set ErrorDocument 404 /404.html or similar in a
per-site context, but do you know if a standard one can be used to replace
the Apache one?

That way, one wouldn't need to dump a whole bunch of 404.html files into
each public_html, and it'd work instantly across all sites. AND if a user
setup their own .htaccess and override the default 404, it would work (ie.
use their own 404 page).

I was hoping there would be a way to load up a 404.html from the
filesystem, so something like
ErrorDocument 404 /home/default/404.html
could be done for all sites as a default... or at least some sort of
workaround.

Do you guys have some better method or idea, rather than copying the
404.html webpage into all the sites?

Thanks in advance.

Jas


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



Re: Default Apache 404 for all sites

2003-07-13 Thread Shri Shrikumar
On Sun, 2003-07-13 at 19:53, Jason Lim wrote:
> In Apache, I know you can set ErrorDocument 404 /404.html or similar in a
> per-site context, but do you know if a standard one can be used to replace
> the Apache one?

I havent actually done this so its a guess - why dont you try sticking
it outside the virtual host definition; that way it will be the default
unless you specify a different on in the virtual host.

HTH,

Shri

-- 

Shri Shrikumar   U R Byte Solutions   Tel:   0845 644 4745
I.T. Consultant  Edinburgh, Scotland  Mob:   0773 980 3499
 Web: www.urbyte.com  Email: [EMAIL PROTECTED]


signature.asc
Description: This is a digitally signed message part


Re: Default Apache 404 for all sites

2003-07-13 Thread Leonardo Boselli
I was told to set a script in php or perl that looks if in the directory where 
the called poage were an 404.php or 404.html file, if so include that,  
otherwise go up a level and try again, if one reach the home of the 
domain and does not find any 404 then use the default one ...
if you coded the script please send it to me .

Il 14 Jul 2003 alle 2:53, Jason Lim immise in rete:

> Hi All,
> 
> While not specifically Debian, I'm sure you guys figured this one out
> ages ago.
> 
> In Apache, I know you can set ErrorDocument 404 /404.html or similar
> in a per-site context, but do you know if a standard one can be used
> to replace the Apache one?
> 
> That way, one wouldn't need to dump a whole bunch of 404.html files
> into each public_html, and it'd work instantly across all sites. AND
> if a user setup their own .htaccess and override the default 404, it
> would work (ie. use their own 404 page).
> 
> I was hoping there would be a way to load up a 404.html from the
> filesystem, so something like
> ErrorDocument 404 /home/default/404.html
> could be done for all sites as a default... or at least some sort of
> workaround.
> 
> Do you guys have some better method or idea, rather than copying the
> 404.html webpage into all the sites?
> 
> Thanks in advance.
> 
> Jas
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact
> [EMAIL PROTECTED]
> 
> 

--
Leonardo Boselli
Nucleo Informatico e Telematico del Dipartimento Ingegneria Civile
Universita` di Firenze , V. S. Marta 3 - I-50139 Firenze
tel +39 0554796431 cell +39 3488605348 fax +39 055495333
http://www.dicea.unifi.it/~leo


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



Re: Default Apache 404 for all sites

2003-07-13 Thread Gene Grimm
Leonardo Boselli wrote:
I was told to set a script in php or perl that looks if in the directory where 
the called poage were an 404.php or 404.html file, if so include that,  
otherwise go up a level and try again, if one reach the home of the 
domain and does not find any 404 then use the default one ...
if you coded the script please send it to me .


What I've done is this, and it seems to work for me:

Alias /errors/ /usr/share/apache/errors/
ErrorDocument 400 /errors/error.php
ErrorDocument 401 /errors/error.php
ErrorDocument 403 /errors/error.php
ErrorDocument 404 /errors/error.php
ErrorDocument 408 /errors/error.php
ErrorDocument 500 /errors/error.php
It's a PHP script that reads the error code and displays a generically 
formatted error message for all sites on my server.

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


cgi-bin directory under home/user/public_html

2003-07-13 Thread Nestor R. Mazza



Hi 
 
My server is 
Debian Woody 3.0r1
Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.1.2 
mod_perl/1.26
 
All the scripts works fine under original directories but 
now I want to put the user's scripts under 
/home/user/public_html/cgi-bin ...
At first I put   
/home/bodegonweb/public_html/cgi-bin/test-cgi  the same script that works 
fine under /usr/lib/cgi-bin
 
I have red the Apache Documentation but until today I 
couldn't get to works fine ...
 
Apache documentation says 

There are many ways to give each user directory a cgi-bin directory such that 
anything requested as http://example.com/~user/cgi-bin/program will 
be executed as a CGI script. Two alternatives are:

  Place the cgi-bin directory next to the public_html directory: 
  
ScriptAliasMatch ^/~([^/]*)/cgi-bin/(.*) 
/home/$1/cgi-bin/$2 
  Place the cgi-bin directory underneath the public_html directory: 
  
Options 
ExecCGISetHandler 
cgi-script 
If you are using suexec, the first technique will not work because CGI 
scripts must be stored under the public_html 
directory.
I have used the second option under the virtualhost of the 
user  
 
## Dominio 
bodegonweb.com.ar#
 
    ServerAdmin [EMAIL PROTECTED]    ServerName www.bodegonweb.com.ar    DocumentRoot 
/home/bodegonweb/public_html
  Options 
ExecCGISetHandler cgi-script  
 
   #    ErrorLog 
logs/host.some_domain.com-error.log#    CustomLog 
logs/host.some_domain.com-access.log common 


I'll apprecite your cooperation Regards Nestor 
Mazza [EMAIL PROTECTED]



Re: cgi-bin directory under home/user/public_html

2003-07-13 Thread Jason Lim

- Original Message - 
From: "Nestor R. Mazza" <[EMAIL PROTECTED]>
To: "DEBIAN debian-isp" 
Sent: 13 July, 2003 11:06 PM
Subject: cgi-bin directory under home/user/public_html


Hi

My server is 
Debian Woody 3.0r1
Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.1.2 mod_perl/1.26

All the scripts works fine under original directories but now I want to
put the user's scripts under /home/user/public_html/cgi-bin ...

At first I put   /home/bodegonweb/public_html/cgi-bin/test-cgi  the
same script that works fine under /usr/lib/cgi-bin

I have red the Apache Documentation but until today I couldn't get to
works fine ...

Apache documentation says 

There are many ways to give each user directory a cgi-bin directory such
that anything requested as http://example.com/~user/cgi-bin/program will
be executed as a CGI script. Two alternatives are:

  1.. Place the cgi-bin directory next to the public_html directory:
ScriptAliasMatch ^/~([^/]*)/cgi-bin/(.*) /home/$1/cgi-bin/$2
  2.. Place the cgi-bin directory underneath the public_html directory:

Options ExecCGI
SetHandler cgi-script

If you are using suexec, the first technique will not work because CGI
scripts must be stored under the public_html directory.

I have used the second option under the virtualhost of the user 

#
# Dominio bodegonweb.com.ar
#


ServerAdmin [EMAIL PROTECTED]
ServerName www.bodegonweb.com.ar
DocumentRoot /home/bodegonweb/public_html
  
Options ExecCGI
SetHandler cgi-script
  

#ErrorLog logs/host.some_domain.com-error.log
#CustomLog logs/host.some_domain.com-access.log common



==
Unfortunately, if you want to use suexec, you'll need to recompile it to
allow /home/*/public_html/cgi-bin/ otherwise it won't run.

There are docs on this common issue. Google is your friend.




Default Apache 404 for all sites

2003-07-13 Thread Jason Lim
Hi All,

While not specifically Debian, I'm sure you guys figured this one out ages
ago.

In Apache, I know you can set ErrorDocument 404 /404.html or similar in a
per-site context, but do you know if a standard one can be used to replace
the Apache one?

That way, one wouldn't need to dump a whole bunch of 404.html files into
each public_html, and it'd work instantly across all sites. AND if a user
setup their own .htaccess and override the default 404, it would work (ie.
use their own 404 page).

I was hoping there would be a way to load up a 404.html from the
filesystem, so something like
ErrorDocument 404 /home/default/404.html
could be done for all sites as a default... or at least some sort of
workaround.

Do you guys have some better method or idea, rather than copying the
404.html webpage into all the sites?

Thanks in advance.

Jas




Re: Default Apache 404 for all sites

2003-07-13 Thread Shri Shrikumar
On Sun, 2003-07-13 at 19:53, Jason Lim wrote:
> In Apache, I know you can set ErrorDocument 404 /404.html or similar in a
> per-site context, but do you know if a standard one can be used to replace
> the Apache one?

I havent actually done this so its a guess - why dont you try sticking
it outside the virtual host definition; that way it will be the default
unless you specify a different on in the virtual host.

HTH,

Shri

-- 

Shri Shrikumar   U R Byte Solutions   Tel:   0845 644 4745
I.T. Consultant  Edinburgh, Scotland  Mob:   0773 980 3499
 Web: www.urbyte.com  Email: [EMAIL PROTECTED]


signature.asc
Description: This is a digitally signed message part


Re: Default Apache 404 for all sites

2003-07-13 Thread Leonardo Boselli
I was told to set a script in php or perl that looks if in the directory where 
the called poage were an 404.php or 404.html file, if so include that,  
otherwise go up a level and try again, if one reach the home of the 
domain and does not find any 404 then use the default one ...
if you coded the script please send it to me .

Il 14 Jul 2003 alle 2:53, Jason Lim immise in rete:

> Hi All,
> 
> While not specifically Debian, I'm sure you guys figured this one out
> ages ago.
> 
> In Apache, I know you can set ErrorDocument 404 /404.html or similar
> in a per-site context, but do you know if a standard one can be used
> to replace the Apache one?
> 
> That way, one wouldn't need to dump a whole bunch of 404.html files
> into each public_html, and it'd work instantly across all sites. AND
> if a user setup their own .htaccess and override the default 404, it
> would work (ie. use their own 404 page).
> 
> I was hoping there would be a way to load up a 404.html from the
> filesystem, so something like
> ErrorDocument 404 /home/default/404.html
> could be done for all sites as a default... or at least some sort of
> workaround.
> 
> Do you guys have some better method or idea, rather than copying the
> 404.html webpage into all the sites?
> 
> Thanks in advance.
> 
> Jas
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact
> [EMAIL PROTECTED]
> 
> 

--
Leonardo Boselli
Nucleo Informatico e Telematico del Dipartimento Ingegneria Civile
Universita` di Firenze , V. S. Marta 3 - I-50139 Firenze
tel +39 0554796431 cell +39 3488605348 fax +39 055495333
http://www.dicea.unifi.it/~leo




Re: Default Apache 404 for all sites

2003-07-13 Thread Gene Grimm
Leonardo Boselli wrote:
I was told to set a script in php or perl that looks if in the directory where 
the called poage were an 404.php or 404.html file, if so include that,  
otherwise go up a level and try again, if one reach the home of the 
domain and does not find any 404 then use the default one ...
if you coded the script please send it to me .

What I've done is this, and it seems to work for me:
Alias /errors/ /usr/share/apache/errors/
ErrorDocument 400 /errors/error.php
ErrorDocument 401 /errors/error.php
ErrorDocument 403 /errors/error.php
ErrorDocument 404 /errors/error.php
ErrorDocument 408 /errors/error.php
ErrorDocument 500 /errors/error.php
It's a PHP script that reads the error code and displays a generically 
formatted error message for all sites on my server.