Skip to content
Merged
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
7 changes: 7 additions & 0 deletions setup/web_server_configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,13 @@ The **minimum configuration** to get your application running under Nginx is:
# try to serve file directly, fallback to index.php
try_files $uri /index.php$is_args$args;
}

# optionally disable falling back to php script for the asset directories
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# optionally disable falling back to php script for the asset directories
# optionally disable falling back to PHP script for the asset directories

Copy link
Contributor

Choose a reason for hiding this comment

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

why does it say "optionally" if it's enabled by default? I also don't really see the value of adding it. It only prevents use-cases like having a route starting with /bundles.

# which will allow nginx to return a 404 error when files are
# not found instead of passing the request to Symfony
location /bundles {
try_files $uri $uri/ =404;
Copy link
Member

Choose a reason for hiding this comment

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

Actually, if you are looking for a file, the $uri/ lookup seems useless to me.

}

location ~ ^/index\.php(/|$) {
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
Expand Down