You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Matthias Teege <ma...@mteege.de> on 2005/09/05 22:44:43 UTC

[users@httpd] directory for static content in an apache frontend to zope

Moin,

I'm using an apache 1.3.33 as frontend to a zope installation. It works
with this config:

<VirtualHost 8.15.47.11:80>
    ServerName my.server.net
    <LocationMatch "^[^/]">
       Deny from all
    </LocationMatch>
    ProxyPass / http://127.0.0.1:8080/VirtualHostBase/http/h:80/vh/portal/mpl/VirtualHostRoot/
    ProxyPassReverse / http://127.0.0.1:8080/VirtualHostBase/http/h:80/vh/portal/mpl/VirtualHostRoot/
    CacheSize 10000
    ..
    ExpiresByType text/xml A3600
</VirtualHost>     

Now I need a special directory for static content under
my.server.net/static but

    Alias /static/ "/home/www/static/"
    <Directory "/home/www/static/">
        Options Indexes MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory> 

doesnt work. How do I configure apache for that task?

Many thanks
Matthias

-- 
make world not war

---------------------------------------------------------------------
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] directory for static content in an apache frontend to zope

Posted by Joshua Slive <js...@gmail.com>.
On 9/6/05, Matthias Teege <ma...@mteege.de> wrote:
> On Tue, Sep 06, 2005 at 09:14:26AM -0400, Joshua Slive wrote:
> > Start by removing ALL the ProxyPass directives from the config and
> > make sure you can access the static content.
> 
> Ok, I've done so and I can access the static content without the
> ProxyPass rules. The I add ProxyPass /static/ ! and get the "Bad
> Request". Is it possible, that the "!" syntax doesn't work in 1.3.xx?

Bingo.  Sorry, I forgot about that.  For 1.3, you need to use mod_rewrite:

RewriteEngine On
RewriteRule ^/static - [L]
RewriteRule (.*)
http://127.0.0.1:8080/VirtualHostBase/http/h:80/vh/portal/mpl/VirtualHostRoot$1
[P]
ProxyPassReverse /
http://127.0.0.1:8080/VirtualHostBase/http/h:80/vh/portal/mpl/VirtualHostRoot/

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


Re: [users@httpd] directory for static content in an apache frontend to zope

Posted by Matthias Teege <ma...@mteege.de>.
On Tue, Sep 06, 2005 at 09:14:26AM -0400, Joshua Slive wrote:
> Start by removing ALL the ProxyPass directives from the config and
> make sure you can access the static content.

Ok, I've done so and I can access the static content without the
ProxyPass rules. The I add ProxyPass /static/ ! and get the "Bad
Request". Is it possible, that the "!" syntax doesn't work in 1.3.xx?

Matthias

-- 
make world not war

---------------------------------------------------------------------
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] directory for static content in an apache frontend to zope

Posted by Joshua Slive <js...@gmail.com>.
On 9/6/05, Matthias Teege <ma...@mteege.de> wrote:
> On Mon, Sep 05, 2005 at 06:29:02PM -0400, Joshua Slive wrote:
> 
> > BEFORE the existing ProxyPass directive, put
> > ProxyPass /static !
> 
> I've done this but got a "400 Bad Request" if I try to access
> my.vhost.net/static/. Do I need the alias directive?

Start by removing ALL the ProxyPass directives from the config and
make sure you can access the static content.

Be sure to check the error log.

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


Re: [users@httpd] directory for static content in an apache frontend to zope

Posted by Matthias Teege <ma...@mteege.de>.
On Mon, Sep 05, 2005 at 06:29:02PM -0400, Joshua Slive wrote:

> BEFORE the existing ProxyPass directive, put
> ProxyPass /static !

I've done this but got a "400 Bad Request" if I try to access
my.vhost.net/static/. Do I need the alias directive?

<VirtualHost 8.15.47.11:80>
    ServerName my.vhost.net
    DocumentRoot /home/www/

    <LocationMatch "^[^/]">
       Deny from all
    </LocationMatch>

    ProxyPass /old/ !
    ProxyPass / http://127.0.0.1:9080/VirtualHostBase/http/h:80/dir/VirtualHostRoot/
    ProxyPassReverse / http://127.0.0.1:9080/VirtualHostBase/http/h:80/dir/VirtualHostRoot/
    ...
</VirtualHost>    

Thanks,
Matthias

-- 
make world not war

---------------------------------------------------------------------
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] directory for static content in an apache frontend to zope

Posted by Joshua Slive <js...@gmail.com>.
On 9/5/05, Matthias Teege <ma...@mteege.de> wrote:
> Moin,
> 
> I'm using an apache 1.3.33 as frontend to a zope installation. It works
> with this config:
> 
> <VirtualHost 8.15.47.11:80>
>    ServerName my.server.net
>    <LocationMatch "^[^/]">
>       Deny from all
>    </LocationMatch>
>    ProxyPass / http://127.0.0.1:8080/VirtualHostBase/http/h:80/vh/portal/mpl/VirtualHostRoot/
>    ProxyPassReverse / http://127.0.0.1:8080/VirtualHostBase/http/h:80/vh/portal/mpl/VirtualHostRoot/
>    CacheSize 10000
>    ..
>    ExpiresByType text/xml A3600
> </VirtualHost>
> 
> Now I need a special directory for static content under
> my.server.net/static but
> 
>    Alias /static/ "/home/www/static/"

> doesnt work. How do I configure apache for that task?

BEFORE the existing ProxyPass directive, put
ProxyPass /static !

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