mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
Added note about configuring nginx for HTTPS
This commit is contained in:
@ -122,7 +122,7 @@ an [FPM SAPI](http://php.net/install.fpm). Below is a sample host configuration
|
||||
The configuration tells the server to send all requests for non-existent resources through the bootstrap file,
|
||||
resulting in "prettier" URLs without the need for `index.php` references.
|
||||
|
||||
~~~
|
||||
```
|
||||
server {
|
||||
set $yii_bootstrap "index.php";
|
||||
charset utf-8;
|
||||
@ -159,6 +159,10 @@ server {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
~~~
|
||||
```
|
||||
|
||||
When using this configuration, you should set `cgi.fix_pathinfo=0` in the `php.ini` file in order to avoid many unnecessary system `stat()` calls.
|
||||
|
||||
|
||||
Note that when running HTTP server you need to add `fastcgi_param HTTPS on;` in order for Yii to properly detect if
|
||||
connection is secure.
|
||||
|
Reference in New Issue
Block a user