[SOLVED] Tips for GRAV cms under ispconfig ? (options or rewriting rules ?)

Discussion in 'Installation/Configuration' started by ledufakademy, Sep 20, 2020.

  1. ledufakademy

    ledufakademy Member HowtoForge Supporter

    after inflating GRAV in client web root , we got this :

    ERROR 404 - Not Found!

    (grav seem to rewrite to /admin ...)


    [SOLVED] , here is the tips , put this code into your website , nginx options tabs:

    location / {
    try_files $uri $uri/ /index.php?$query_string;
    }

    location ~* /(\.git|cache|bin|logs|backup|tests)/.*$ { return 403; }

    location ~* /(system|vendor)/.*\.(txt|xml|md|html|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ { return 403; }

    location ~* /user/.*\.(txt|md|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ { return 403; }

    location ~ /(LICENSE\.txt|composer\.lock|composer\.json|nginx\.conf|web\.config|htaccess\.txt|\.htaccess) { return 403; }

    location ~ \.php$ {
    # Choose either a socket or TCP/IP address
    fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_index index.php;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
    }

     
    Last edited: Sep 20, 2020

Share This Page