jeudi 5 février 2015

Serving files outsite of root using NGINX


Vote count:

0




i have files in mounted drives



/folder1/
/folder2/
/folder3/


The files i link to come up 404 and the error log shows: /var/www/webiste/fileIlinkedto


Can anyone show me how fix this error?


I think it should be working like: site.com/file


and it should go get the file from one of the folders /folderX/file


any help would be GREATLY apprieciated!


below is my nginx site config file:



root /var/www/website;
index index.php;
client_max_body_size 5G;
location ~ \.php$ {
if (!-e $request_filename) { rewrite ^/(.*) /index.php?_page_url=$1 last;}
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

location / {
if (!-e $request_filename) {
rewrite ^/(.*) /index.php?_page_url=$1 last;
}
}


asked 22 secs ago







Serving files outsite of root using NGINX

Aucun commentaire:

Enregistrer un commentaire