• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rewriting to /public directory from root with NGINX

#1
Hello,

I am trying to redirect request from my local root (http://localhost/blog4/; NGINX) to index.php inside /public folder, yet with no luck (the server returns error "this site does not work: localhost caused too many redirects"). The relevant fragment from nginx.conf:
Code:
...
location /blog4 {
root /usr/share/nginx/html;
index index.php;
return /blog4/public;
}

Did anyone find a solution for such a redirect?

Looking forward for hints.
Yours, Piotrek
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.