As soon as I add the expires section (at the bottom) accel-redirect
for images stops working.
Is it apparent why?
My config:
Thanks,
Alex
As soon as I add the expires section (at the bottom) accel-redirect
for images stops working.
Is it apparent why?
My config:
Thanks,
Alex
How does this look?
I updated the ‘^~’ to my location, but I moved the expires to a
different section.
How’s this config?
Alex
On Wed, Feb 13, 2008 at 10:22:10AM -0800, Alex E. wrote:
Here’s the link:
I prefer this configuration:
server {
...
root /u/apps/asdf/current/public;
if (-f $document_root/system/maintenance.html) {
rewrite ^(.*)$ /system/maintenance.html last;
}
if (-f $request_filename.html) {
rewrite (.*) $1.html last;
}
location / {
index index.html;
error_page 404 = @mongrel;
}
location @monrgel {
proxy_pass http://monrgel;
proxy_set_header ...
...
}
location ^~ /accounts {
internal;
root /u/apps/asdf/shared;
}
location ~* \.(js|css|jpg|jpeg|gif|png|swf)$ {
expires 1M;
}
error_page 500 502 503 504 /500.html;
location = /500.html {
root /u/apps/asdf/current/public;
}
On Tue, Feb 12, 2008 at 10:48:52PM -0800, Alex E. wrote:
As soon as I add the expires section (at the bottom) accel-redirect
for images stops working.Is it apparent why?
My config:
I have tired of this “if (-f $request_filename)” pattern.
This became the same ugly pattern as Apache’s Auth directives usage in
.htaccess only and lot of RewriteRule’s to compencate inability
of PHP programmers to work with URIs different from /index.php.
You should use ^~ in “location ^~ /accounts”:
location ^~ /accounts {
internal;
root /u/apps/asdf/shared;
}
And remove the useless “if (-f $request_filename)” in static location:
location ~* \.(js|css|jpg|jpeg|gif|png|swf)$ {
expires 1M;
}
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs