Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Commit

Permalink
Tweak the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Takashi Matsuo committed Aug 10, 2016
1 parent b799624 commit 301a530
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions php-nginx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,24 @@ location / {
}
```

You might need to add some rewrite rules, or you might want to change
the behavior. In those cases, put a file named `nginx-app.conf` in the
project root directory. Then the runtime will override the default
file with the file you provided.
In this case, index.php is used as the framework front controller.

You may need to change this to something different for your
project. The Symfony framework, for instance, uses app.php instead of
index.php.

You might also need to add some nginx rewrite rules. In those cases,
put a file named `nginx-app.conf` in the project root directory. Then
the runtime will override the default file with the file you provided.

Here is an example `nginx-app.conf` for the Symfony framework:

```ini
location / {
# try to serve files directly, fallback to the front controller
try_files $uri /app.php$is_args$args;
}
```

I hope this mechanism can cover most of your use cases, but let us
know if you found otherwise.
Expand Down

0 comments on commit 301a530

Please sign in to comment.