On May 21, 2012, at 9:32 AM, Jason Brower wrote:
>
> How... How does it work?
> http://www.youtube.com/watch?v=xOrgLj9lOwk
> I haven't a clue how to check for that. :/
I'm not an expert here, so anyone who cares to correct me: feel free to jump in.
Your setup file created an Apache configuration file that contains this section:
AliasMatch ^/([^/]+)/static/(.*) \
%(web2pydir)s/applications/$1/static/$2
<Directory %(web2pydir)s/applications/*/static/>
Options -Indexes
Order Allow,Deny
Allow from all
</Directory>
I think what's going on here is that Apache will preferentially serve the
indicated files without making a wsgi call. That's typically what you want, for
efficiency.
How to test? What I do is to use curl -I to look at the http response headers;
you could presumably use any browser that lets you see the headers. There
should be a difference between the headers for a static file response depending
on whether the above section is in the configuration file.
> BR,
> Jason
> On 05/21/2012 04:05 PM, Jonathan Lundell wrote:
>> On May 20, 2012, at 10:36 PM, Jason Brower wrote:
>>> A suppose it would be a little off topic, but I need it for my web2py
>>> application.
>>> The book tells me I shouldn't use routes in web2py and use apache.
>>> I have mod_proxy install, as I used the setup-web2py-ubuntu.sh script and
>>> it seems to have works perfects.
>>> I have the program installed and running at http://example.com/interestid/.
>>> When you go there it works perfectly.
>>> But I would like a little more quality and put it here...
>>> http://example.com
>>> An hints on how to get that to work; or better a play-by-play. (I can
>>> program all day, but apache freaks me right out!)
>> Go ahead and use web2py routing for your active URLs—the ones that invoke
>> web2py code. The main thing for server (eg Apache) routing is to directly
>> serve static assets. IIRC, the setup script you used should already be doing
>> that, but you might want to confirm it.
>