Valentin

Valentin

Closed

I have some static sites which don't require PHP. From a security and performance view, it would be nice if there was a possibility to disable PHP for a site.

Dennis

Dennis

· · Edited
·

You can, just put these lines in comment:

    location ~ \.php$ {
        try_files $uri /index.php =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/run/php/php8.1-fpm.sock;
        fastcgi_buffers 16 16k;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

And change this:

index index.php index.html;

To:

index index.html;

1 total vote
Valentin

Ability to disable PHP for a website

1 total vote
Valentin
  • Dennis moved item to board Closed

    2 years ago
  • Valentin moved item to project Site Level Requests

    2 years ago
  • Valentin created the item

    2 years ago