Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't delete the automatically generated location setting #1554

Closed
betgamesnetwork opened this issue Jan 31, 2021 · 0 comments · Fixed by #2146
Closed

I can't delete the automatically generated location setting #1554

betgamesnetwork opened this issue Jan 31, 2021 · 0 comments · Fixed by #2146

Comments

@betgamesnetwork
Copy link

betgamesnetwork commented Jan 31, 2021

Owned a PHP-fpm container and another Nginx-proxy container.
For PHP-fpm to work, I include settings in /vhost.d/VIRTUAL_HOST and /vhost.d/VIRTUAL_HOST_location:

/vhost.d/VIRTUAL_HOST:

        index index.php index.html;
        root / var / www / html / public;
        location ~ \ .php $ {
        try_files $ uri = 404;
        fastcgi_split_path_info ^ (. + \. php) (/.+) $;
        fastcgi_pass back-end: 9000;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME / var / www / html / public $ fastcgi_script_name;
        fastcgi_param PATH_INFO $ fastcgi_path_info;
        }

/vhost.d/VIRTUAL_HOST_location:

        try_files $ uri $ uri / /index.php?$query_string;
        gzip_static on;

Nginx-proxy automatically generates my location within defatul.conf as:

        location / {
                root / var / www / html / public;
                include fastcgi_params;
                fastcgi_pass VIRTUAL_HOST;
                include /etc/nginx/vhost.d/VIRTUAL_HOST_location;
        }

For my PHP-fpm to work, I need to remove it from my location inside the default.conf:

                root / var / www / html / public;
                include fastcgi_params;
                fastcgi_pass VIRTUAL_HOST;

The inclusion in location works, how do I remove these settings from the locatin automatically every time it is generated or does not allow the generation of these settings?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant