HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Nginx: where to put URL re-write rules, etc. (http://www.howtoforge.com/forums/showthread.php?t=61252)

msp 1st April 2013 21:38

Nginx: where to put URL re-write rules, etc.
 
I am trying to move my websites from a server running ISPConfig3/Apache to a new server running ISPConfig3/nginx.

Most of my sites run ModX Evolution, with URL re-writing.

After a bit of research, I have added the following directives to the "nginx directives" box under the Options tab for the website in ISPConfig3:

Code:

# nginx configuration

location /manager {
}

location /assets {
}

location ~ \.(jpg|jpeg|png|gif|ico)$ {
}

location / {
  if ($http_user_agent ~* "^.*internal\ dummy\ connection.*$"){
    return 403;
  }
  if (!-e $request_filename){
    rewrite ^(.*)$ /index.php?q=$1 break;
  }
}

Unfortunately, it's not working.

Have I put this in the correct place?

till 2nd April 2013 12:20

Quote:

Have I put this in the correct place?
Yes, thats the correct place.


All times are GMT +2. The time now is 20:55.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.