Skip to content

Commit

Permalink
Add Nginx support
Browse files Browse the repository at this point in the history
  • Loading branch information
peter279k committed Sep 5, 2023
1 parent 23cc8a9 commit 21dd9a4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A URL base path detector for Slim 4.

## Features

* Support for Apache and the PHP built-in webserver
* Support for Apache, Nginx and the PHP built-in webserver
* Tested
* No dependencies
* Very fast
Expand Down Expand Up @@ -66,6 +66,16 @@ RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]
```

For Nginx we need to edit the Nginx configuration and it can redirect the web traffic to the front controller:

```conf
root /path/to/public;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
```

## Usage

### Slim 4 integration
Expand Down

0 comments on commit 21dd9a4

Please sign in to comment.