Skip to content

Add Nginx configuration to environment variables #7044

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

Closed
wants to merge 2 commits into from

Conversation

petk
Copy link
Contributor

@petk petk commented Oct 6, 2016

The environment variables example in the configuration chapter currently includes only configuration for Apache web server. This patch adds also Nginx with the fastcgi_param directive.

Thank you for considering merging it. In case there needs to be some additional rewording or changes done, let me know.

@@ -40,13 +40,41 @@ the following ``VirtualHost`` configuration:
</Directory>
</VirtualHost>

For Nginx web servers, the environment variables can be set with `fastcgi_param`_
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[...] with the fastcgi_param [...]

@@ -40,13 +40,41 @@ the following ``VirtualHost`` configuration:
</Directory>
</VirtualHost>

For Nginx web servers, the environment variables can be set with `fastcgi_param`_
directive. For example in the configuration file where the ``fastcgi_params``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example, in [...]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way, is the part about the included fastcgi_params file mandatory? I mean is it important that this file is imported?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fastcgi_params file includes other server and execution environment information defined with fastcgi_param such as:
DOCUMENT_ROOT, SERVER_ADDR etc. It is not essential to be on this place. More because of a convenience and according to other examples as well. The custom defined environment variables would be set also without this file in PHP later on but the PHP $_SERVER would not be filled with other info.

@xabbuh
Copy link
Member

xabbuh commented Oct 7, 2016

👍 LGTM

@javiereguiluz
Copy link
Member

I don't use Nginx, but this looks 👍 to me. Thanks @peterkokot.

@xabbuh
Copy link
Member

xabbuh commented Oct 14, 2016

Thank you @peterkokot.

xabbuh added a commit that referenced this pull request Oct 14, 2016
xabbuh added a commit that referenced this pull request Oct 14, 2016
* 2.7:
  [#7044] minor tweak
  Add Nginx configuration to environment variables
  Fix typo in doctrine.rst (to manage)
  Changed RFC links from drafts to proposed standarts
  Remove a dead link to the PR header
  Minor improvements for the contribution guide
  use single quotes for YAML strings
  Fix incorrect callback validation example
  Fix a typo in the serializer doc
  Fix 404 error link for American English Oxford Dictionary
  Use strict comparison
xabbuh added a commit that referenced this pull request Oct 14, 2016
* 2.8:
  [#7044] minor tweak
  Add Nginx configuration to environment variables
  Fix typo in doctrine.rst (to manage)
  Changed RFC links from drafts to proposed standarts
  Remove a dead link to the PR header
  Minor improvements for the contribution guide
  use single quotes for YAML strings
  Fix incorrect callback validation example
  Fix a typo in the serializer doc
  Fix 404 error link for American English Oxford Dictionary
  Use strict comparison
@xabbuh xabbuh closed this in eefbbec Oct 14, 2016
xabbuh added a commit that referenced this pull request Oct 14, 2016
* 3.1:
  [#7044] minor tweak
  Add Nginx configuration to environment variables
  Update the Apache Router article to deprecate it entirely
  Fix typo in doctrine.rst (to manage)
  Changed RFC links from drafts to proposed standarts
  Remove a dead link to the PR header
  Minor improvements for the contribution guide
  use single quotes for YAML strings
  Fix incorrect callback validation example
  Fix a typo in the serializer doc
  Fix 404 error link for American English Oxford Dictionary
  Use strict comparison
@petk petk deleted the patch-env branch October 14, 2016 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants