You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Florian Effenberger <fl...@arcor.de> on 2003/12/15 14:56:07 UTC

[users@httpd] mod_rewrite, suEXEC and error pages

Hi there,

I hope my question has not been asked a hundred times before.

I use Apache with suEXEC, which has been working fine for the last couple of
months. Some users have the privilege to publish their own sub-sites. These
sites do use suEXEC as well. Normally, they had to be opened via "~user",
but in order to make them available with other paths, I have created the
following rule in several VHosts:

RewriteRule ^/sub-site$ /sub-site/ [R]
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^/sub-site/(.*) http://www.virtual.domain/~users/$1 [P]

I.e. the user "user" can upload his page separately, while it still uses
suEXEC and is available via "/sub-site".

1.) I'm not good at doing mod_rewrite, so I think the above could be written
in a more easy way. Any ideas? ;-)

2.) The only crook is, that on error sites or directory listings I now - of
course - see "Index of ~user" or "Could not find ~user/non.existant.html".
What could I do to replace ~user with sub-site in here, when I want to use
suEXEC?

Thanks a lot!
Florian


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


Re: [users@httpd] mod_rewrite, suEXEC and error pages

Posted by Florian Effenberger <fl...@arcor.de>.
Hi Joshua,


> No, I recall pretty much this exact question being asked and
> answered a couple weeks ago.  Wasn't it you who asked?

I thought so as well, but wasn't sure if I posted it to this list. I check
the archives, but couldn't find anything, so I posted it again.

> No, there is no way to fix this.
> You could consider using a more flexible suid cgi wrapper like "cgiwrap"
> in place of suexec so that you do not need to do the proxying and can
> simply serve the content from the URLs that you want.

Okay, thanks a lot, will look at cgiwrap! :)

Florian


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


Re: [users@httpd] mod_rewrite, suEXEC and error pages

Posted by Joshua Slive <jo...@slive.ca>.
On Mon, 15 Dec 2003, Florian Effenberger wrote:
> I hope my question has not been asked a hundred times before.

No, I recall pretty much this exact question being asked and answered a
couple weeks ago.  Wasn't it you who asked?

> 2.) The only crook is, that on error sites or directory listings I now - of
> course - see "Index of ~user" or "Could not find ~user/non.existant.html".
> What could I do to replace ~user with sub-site in here, when I want to use
> suEXEC?

No, there is no way to fix this.

You could consider using a more flexible suid cgi wrapper like "cgiwrap"
in place of suexec so that you do not need to do the proxying and can
simply serve the content from the URLs that you want.

Joshua.

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