Skip to content

Instantly share code, notes, and snippets.

@AndreiTelteu
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndreiTelteu/9e05802de1750eb95d32 to your computer and use it in GitHub Desktop.
Save AndreiTelteu/9e05802de1750eb95d32 to your computer and use it in GitHub Desktop.

This configuration you have to pass in the Custom configuration textarea for hosting CakePHP Framework on Ajenti panel.

Please note that in the general tab your Path must end with "app/webroot/".

    # Not found this on disk?
    # Feed to CakePHP for further processing!
    if (!-e $request_filename) {
        rewrite ^/(.+)$ /index.php?url=$1 last;
        break;
    }

    # Static files.
    # Set expire headers, Turn off access log
    location ~* \favicon.ico$ {
        access_log off;
        expires 1d;
        add_header Cache-Control public;
    }
    location ~ ^/(img|cjs|ccss)/ {
        access_log off;
        expires 7d;
        add_header Cache-Control public;
    }

    # Deny access to .htaccess files,
    # git & svn repositories, etc
    location ~ /(\.ht|\.git|\.svn) {
        deny  all;
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment