Apache AliasMatch recommendation from the web2py book is still required?

14 views
Skip to first unread message

João Matos

unread,
Apr 9, 2019, 6:10:32 PM4/9/19
to web2py-users
Hello,

The web2py book recommends changing (in my case adding) this

  AliasMatch  ^/([^/]+)/static/(?:_[\d]+.[\d]+.[\d]+/)?(.*)  "C:/web2py/applications/$1/static/$2"

to Apache conf when caching static files with

    response.static_version = '0.0.0'
    response
.static_version_urls = True

However, I don't see any change and everything works with or without the AliasMatch.

Is there a way to check if it is still required (or if it is being used) or not?


Thanks,

JM

João Matos

unread,
Apr 9, 2019, 6:20:10 PM4/9/19
to web2py-users
The Apache access.log always (with and without the AliasMatch) shows
192.168.56.1 - - [09/Apr/2019:23:15:38 +0100] "GET /ajc/static/_0.0.0/css/web2py-bootstrap4.css HTTP/1.1" 200 8372
192.168.56.1 - - [09/Apr/2019:23:15:38 +0100] "GET /ajc/static/_0.0.0/css/bootstrap.min.css HTTP/1.1" 200 144877
192.168.56.1 - - [09/Apr/2019:23:15:38 +0100] "GET /ajc/static/_0.0.0/js/web2py-bootstrap4.js HTTP/1.1" 200 3029
192.168.56.1 - - [09/Apr/2019:23:15:38 +0100] "GET /ajc/static/_0.0.0/js/modernizr-2.8.3.min.js HTTP/1.1" 200 15514
192.168.56.1 - - [09/Apr/2019:23:15:38 +0100] "GET /ajc/static/_0.0.0/js/bootstrap.bundle.min.js HTTP/1.1" 200 67742
which means that web2py is doing what is supposed to be doing.

Is AliasMatch doing anything?

How can I check that the files are indeed being cached?
Reply all
Reply to author
Forward
0 new messages