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

Clean up nginx config #163

Open
jduan00 opened this issue Dec 22, 2023 · 2 comments
Open

Clean up nginx config #163

jduan00 opened this issue Dec 22, 2023 · 2 comments

Comments

@jduan00
Copy link

jduan00 commented Dec 22, 2023

Just want to share two small proposed changes:

  1. Remove /etc/nginx/fastcgi.conf as it is not used and likely cause confusion. fastcgi_params is actually used.
  2. Use the following line for relevant references (ex. /etc/nginx/conf.d/default.conf, fastcgi_params)
fastcgi_param   SCRIPT_FILENAME         $request_filename;
@TrafeX
Copy link
Owner

TrafeX commented Jan 3, 2024

Hi @jduan00,

Thank you for the tips. I've looked into it and came to the following;

  1. It's indeed not used, but it's part of the default nginx installation. I prefer to leave this alone because this container image serves as an example to adjust to your needs and I want to keep it simple and as standard as possible.
  2. That's indeed a good alternative for $document_root$fastcgi_script_name, but it's doesn't do exactly the same. I'm afraid this can create a backwards compatibility break, while it isn't a major improvement.

What I did change is removing the duplicate SCRIPT_NAME: b829e43

@jduan00
Copy link
Author

jduan00 commented Jan 6, 2024

Hi @TrafeX,

Thanks for the following up. It is matter of personal taste. I want to make it a min set of files within the container, thus I took the axe to get rid of anything that is not used.

Also, I appreciate you pointed out the difference about SCRIPT_FILENAME. https://serverfault.com/questions/465607/nginx-document-rootfastcgi-script-name-vs-request-filename

However, for our Laravel based PHP apps, the one works is:
fastcgi_param SCRIPT_FILENAME $request_filename;

Cheers,

Jack

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

No branches or pull requests

2 participants