List Info

Thread: Re: Serving static files with Apache 1.3 and mod_proxy




Re: Serving static files with Apache 1.3 and mod_proxy
user name
2008-02-23 20:31:55
On Sat, Feb 23, 2008 at 2:19 PM, Thomas Wittek
<streawkceurgooglemail.com> wrote:
>
>  Hi!
>
>  I've got CP (actually TurboGears) running successfully
behind my
>  Apache 1.3:
>
>  ProxyPass / http://127.0.0.1:2390/
>  ProxyPassReverse / http://127.0.0.1:2390/
>
>  But I'd like Apache to serve my static files instead
of CP doing this.
>  So I added this rule:
>
>  ProxyPass /static !
>
>  But all I get as a response is a "Bad
Request". Probably because
>  Apache 1.3 doesn't know "!" as a target and
tries to access the URL
>  "!" -- which of course doesn't exist.
>
>  Does anybody know which rules I have to use to serve
my static files
>  using Apache 1.3?


Well, I am running Apache2 and here is my config to allow
static
files.  It looks very similar to what you have done, so
maybe Apache
1.3 doesn't support it in this manner.

<VirtualHost *>
    ServerAdmin myusermydomain.com
    ServerName mydomain.com
    ServerAlias www.mydomain.com
    ProxyPreserveHost On

    RedirectMatch ^/$ http://www.mydomain.com
/news/

        DocumentRoot /var/www/mysite/htdocs

        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/mysite/htdocs/>
                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/
        </Directory>

    # this prevents the follow path from being proxied
    ProxyPass /music/static !

    <Location /music>
        Order allow,deny
        allow from all
        ProxyPass http://localhost:9876/mus
ic
        ProxyPassReverse http://localhost:9876/mus
ic
    </Location>

        ErrorLog /home/myuser/log/error.log

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

        CustomLog /home/myuser/log/access.log combined
        ServerSignature On

</VirtualHost>

Good luck!

Christian
http://www.dowski.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )