Is it possible with nginx?
Igor Sysoev
is at rambler-co.ru
Mon Feb 16 11:55:51 MSK 2009
On Mon, Feb 16, 2009 at 12:41:44AM +0100, Peter Vage wrote:
> I have problem, can anybody know why when i use variable this code
> doesn't work, and when i type direct address it works? Strange is that
> this variable works in two other places of this config.
>
> server {
> server_name files.com *.files.com;
> ....
> ....
> if ($host ~* "(.*)\.files\.com" ) {
> set $host_without_files $1;
> }
>
> ....
> location ~* ^.+\.(jpg|jpeg|gif|png) {
> root /home/www-data/files.com/$host_without_files; ### works, folder
> web1.com created
> access_log off;
> expires 2d;
> error_page 404 = @fetch;
> break;
> }
>
> location @fetch {
> internal;
> proxy_pass http://$host_without_files; #!!!! DOESN'T WORK, 502 Bad
> Gateway, if i type here http://web1.http then it works
- proxy_pass http://$host_without_files;
+ proxy_pass http://$host_without_files.http;
> proxy_store on;
> proxy_store_access user:rw group:rw all:r;
> proxy_temp_path /home/www-data/temp;
> root /home/www-data/files.com/$host_without_files; ### works, folder
> web1.com created
> }
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list