Skip to content

PHP-FPM Config refuses to validate& start nginx #31

@thomascrown

Description

@thomascrown

For security reasons, the PHP-FPM proxy pass config in a sites conf file should be structures as follows:

location ~ .php$ {
if (-f $request_filename) {
fastcgi_pass 127.0.0.1:9000;
}
fastcgi_split_path_info ^(.+.php)(/.+)$;
#fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

The thing is, adding track_uploads uploads 60s; after the fastcgi_pass doesnt work as it triggers a warning when I try to start nginx (saying you can put it in IF statements).

However for security reasons the If statement out to stay there.... Is there any fix/workaround?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions