Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
5f94b0df
Commit
5f94b0df
authored
Jun 29, 2012
by
Miha Vrhovnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improved nginx config. It's secure by default now.
parent
6f99eb8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
+18
-7
doc/web_servers.rst
doc/web_servers.rst
+18
-7
No files found.
doc/web_servers.rst
View file @
5f94b0df
...
...
@@ -39,15 +39,26 @@ resources to ``index.php``:
.. code-block:: nginx
server {
index index.php
#site root is redirected to the app boot script
location = / {
try_files @site @site;
}
#all other locations try other files first and go to our front controller if none of them exists
location / {
try_files $uri $uri/
/index.php
;
try_files $uri $uri/
@site
;
}
location ~ index\.php$ {
fastcgi_pass /var/run/php5-fpm.sock;
fastcgi_index index.php;
#return 404 for all php files as we do have a front controller
location ~ \.php$ {
return 404;
}
location @site {
fastcgi_pass unix:/var/run/php-fpm/www.sock;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
#uncomment when running via https
#fastcgi_param HTTPS on;
include fastcgi_params;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment