Nginx: where to put URL re-write rules, etc.

Discussion in 'Installation/Configuration' started by msp, Apr 1, 2013.

  1. msp

    msp Member

    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:

    # 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?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, thats the correct place.

Share This Page