-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Cookbook][Configuration] tweaks for the web server configuration chapter #4142
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,12 +4,28 @@ | |
Configuring a Web Server | ||
======================== | ||
|
||
The web directory is the home of all of your application's public and static | ||
files. Including images, stylesheets and JavaScript files. It is also where the | ||
front controllers live. For more details, see the :ref:`the-web-directory`. | ||
The preferred way to develop your Symfony2 application is to use | ||
:doc:`PHP's internal web server </cookbook/web_server/built_in>`. However, | ||
when using an older PHP version or when running the application in the production | ||
environment, you'll need to use a fully-featured web server. This article | ||
describes several ways to use Symfony with Apache2 or Nginx. | ||
|
||
The web directory services as the document root when configuring your web | ||
server. In the examples below, this directory is in ``/var/www/project/web/``. | ||
When using Apache2, you can configure PHP as an | ||
:ref:`Apache module <web-server-apache-mod-php>` or with FastCGI using | ||
:ref:`PHP FPM <web-server-apache-fpm>`. FastCGI also is the preferred way | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ... FastCGI is also the... |
||
to use PHP :ref:`with Nginx <web-server-nginx>`. | ||
|
||
.. sidebar:: The Web Directory | ||
|
||
The web directory is the home of all of your application's public and | ||
static files, including images, stylesheets and JavaScript files. It is | ||
also where the front controllers live. For more details, see the :ref:`the-web-directory`. | ||
|
||
The web directory services as the document root when configuring your | ||
web server. In the examples below, the ``web/`` directory will be the | ||
document root. This directory is ``/var/www/project/web/``. | ||
|
||
.. _web-server-apache-mod-php: | ||
|
||
Apache2 with mod_php/PHP-CGI | ||
---------------------------- | ||
|
@@ -63,6 +79,8 @@ following configuration snippet: | |
Require all granted | ||
</Directory> | ||
|
||
.. _web-server-apache-fpm: | ||
|
||
Apache2 with PHP-FPM | ||
-------------------- | ||
|
||
|
@@ -164,6 +182,8 @@ instead: | |
|
||
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization | ||
|
||
.. _web-server-nginx: | ||
|
||
Nginx | ||
----- | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... using Apache2, you can configured PHP as an Apache module...