location question
Tomasz Pajor
nikon at puffy.pl
Thu Sep 3 17:14:44 MSD 2009
> On Thu, Sep 03, 2009 at 01:59:52PM +0200, Tomasz Pajor wrote:
>
>
>> For those who would want to use such a setup:
>>
>> location ~ ^/imgheaders/(.*)$ {
>> root /vhosts/static/img/headers;
>> try_files /$1 @headers;
>> }
>>
>
> location /imgheaders/ {
> alias /vhosts/static/img/headers/;
> try_files $uri @headers;
> }
>
this doesn't work, maybe because i have one more location, this are all
locations in that server space.
location ^~ /imgheaders/ {
alias /vhosts/static/img/headers;
try_files $uri @headers;
}
location @headers {
fastcgi_pass unix:/var/run/spawn-fcgi.sock;
fastcgi_param SCRIPT_FILENAME /vhosts/test/ImageText.php;
include fastcgi_params;
}
location ~* ^.+\.(js|ico|gif|jpg|png|css|swf|xml|xsl|flv|cur|mp3)$ {
root /vhosts/static;
access_log off;
expires 30d;
}
More information about the nginx
mailing list