Welcome! Log In Create A New Profile

Advanced

not found file on symlink...

May 24, 2012 05:06AM
Hi,

I use symlink on files, but nginx got error 404 on files.

I can access the file like this (no error):

http://static.xxx.tld/kvr2wery235cd57uio457azd4a5Tf78sR/2012/20126190.pdf

but not like this

http://static.xxx.tld/dlpdf/24052012w/20127063.pdf this link is a symlink to this file http://static.xxx.tld/kvr2wery235cd57uio457azd4a5Tf78sR/2012/20126190.pdf

Why the serveur said the file is not found ? I don't understand

Here my conf:

server {
listen 80;
server_name static.xxx.tld;
root /home/www/static.xxx.tld;
location / {
return 404;
}

location ~* ^.+.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|xml|swf|otf|eot)$ {
root /home/www/static.xxx.tld;
expires 30d;
add_header Pragma public;
add_header Cache-Control "public";
}
}

Thanks for your help
Bye
Subject Author Posted

not found file on symlink...

zuckbin May 24, 2012 05:06AM

Re: not found file on symlink...

zuckbin May 24, 2012 08:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 67
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready