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

Prevent serving unparsed php files via nginx proxy. #197

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/best-practices/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,12 +415,16 @@ achieved by using an nginx configuration with the following contents:
```
server {
root /home/alice/projects/acme/public;
index index.php index.html;
index index.html index.htm;

location / {
try_files $uri $uri/ @x;
}

location ~* \.php$ {
try_files /dev/null @x;
}

location @x {
proxy_pass http://localhost:8080;
}
Expand Down