Skip to content
Merged
Show file tree
Hide file tree
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 cookbook/en/configuring-webservers/apache.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

# Otherwise forward the request to index.php
RewriteRule . index.php

SetEnv APP_ENV dev

# ...other settings...
</Directory>
Expand All @@ -42,5 +44,10 @@
# Otherwise forward the request to index.php
RewriteRule . index.php

SetEnv APP_ENV dev

# ...other settings...
```

In the above, note the usage of `SetEnv`. Since the Yii3 application template is using environment variables, this is a possible

Check notice on line 52 in cookbook/en/configuring-webservers/apache.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/configuring-webservers/apache.md#L52

[Microsoft.Vocab] Verify your use of 'above' with the A-Z word list.
Raw output
{"message": "[Microsoft.Vocab] Verify your use of 'above' with the A-Z word list.", "location": {"path": "cookbook/en/configuring-webservers/apache.md", "range": {"start": {"line": 52, "column": 8}}}, "severity": "INFO"}
place to set them. In production environment remember to set `APP_ENV` to `prod`.
34 changes: 17 additions & 17 deletions cookbook/en/configuring-webservers/iis.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Configuring web servers: IIS

Check notice on line 1 in cookbook/en/configuring-webservers/iis.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/configuring-webservers/iis.md#L1

[Microsoft.Acronyms] 'IIS' has no definition.
Raw output
{"message": "[Microsoft.Acronyms] 'IIS' has no definition.", "location": {"path": "cookbook/en/configuring-webservers/iis.md", "range": {"start": {"line": 1, "column": 28}}}, "severity": "INFO"}

Check warning on line 1 in cookbook/en/configuring-webservers/iis.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/configuring-webservers/iis.md#L1

[Microsoft.HeadingAcronyms] Avoid using acronyms in a title or heading.
Raw output
{"message": "[Microsoft.HeadingAcronyms] Avoid using acronyms in a title or heading.", "location": {"path": "cookbook/en/configuring-webservers/iis.md", "range": {"start": {"line": 1, "column": 28}}}, "severity": "WARNING"}

When you use [IIS](https://www.iis.net/), host the application in a virtual host (Website) where the document

Check notice on line 3 in cookbook/en/configuring-webservers/iis.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/configuring-webservers/iis.md#L3

[Microsoft.Acronyms] 'IIS' has no definition.
Raw output
{"message": "[Microsoft.Acronyms] 'IIS' has no definition.", "location": {"path": "cookbook/en/configuring-webservers/iis.md", "range": {"start": {"line": 3, "column": 15}}}, "severity": "INFO"}
root points to the `path/to/app/public` folder and configure the website to run PHP.
In that `public` folder, place a file named `web.config` at `path/to/app/public/web.config`.
Use the following content:
Expand All @@ -8,27 +8,27 @@
```xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<directoryBrowse enabled="false" />
<rewrite>
<rules>
<rule name="Hide Yii Index" stopProcessing="true">
<match url="." ignoreCase="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile"
ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory"
ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
<system.webServer>
<directoryBrowse enabled="false" />
<rewrite>
<rules>
<rule name="Hide Yii Index" stopProcessing="true">
<match url="." ignoreCase="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile"
ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory"
ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
```

Also, the following list of Microsoft's official resources could be useful to configure PHP on IIS:

Check notice on line 31 in cookbook/en/configuring-webservers/iis.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/configuring-webservers/iis.md#L31

[Microsoft.Acronyms] 'IIS' has no definition.
Raw output
{"message": "[Microsoft.Acronyms] 'IIS' has no definition.", "location": {"path": "cookbook/en/configuring-webservers/iis.md", "range": {"start": {"line": 31, "column": 96}}}, "severity": "INFO"}

1. [How to set up your first IIS website](https://support.microsoft.com/en-us/help/323972/how-to-set-up-your-first-iis-web-site)

Check notice on line 33 in cookbook/en/configuring-webservers/iis.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/configuring-webservers/iis.md#L33

[Microsoft.Acronyms] 'IIS' has no definition.
Raw output
{"message": "[Microsoft.Acronyms] 'IIS' has no definition.", "location": {"path": "cookbook/en/configuring-webservers/iis.md", "range": {"start": {"line": 33, "column": 30}}}, "severity": "INFO"}
2. [Configure a PHP Website on IIS](https://docs.microsoft.com/en-us/iis/application-frameworks/scenario-build-a-php-website-on-iis/configure-a-php-website-on-iis)

Check notice on line 34 in cookbook/en/configuring-webservers/iis.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/configuring-webservers/iis.md#L34

[Microsoft.Acronyms] 'IIS' has no definition.
Raw output
{"message": "[Microsoft.Acronyms] 'IIS' has no definition.", "location": {"path": "cookbook/en/configuring-webservers/iis.md", "range": {"start": {"line": 34, "column": 32}}}, "severity": "INFO"}
6 changes: 6 additions & 0 deletions cookbook/en/configuring-webservers/nginx-unit.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Configuring web servers: NGINX Unit

Check notice on line 1 in cookbook/en/configuring-webservers/nginx-unit.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/configuring-webservers/nginx-unit.md#L1

[Microsoft.Acronyms] 'NGINX' has no definition.
Raw output
{"message": "[Microsoft.Acronyms] 'NGINX' has no definition.", "location": {"path": "cookbook/en/configuring-webservers/nginx-unit.md", "range": {"start": {"line": 1, "column": 28}}}, "severity": "INFO"}

Run Yii-based apps using [NGINX Unit](https://unit.nginx.org/) with a PHP language module.

Check notice on line 3 in cookbook/en/configuring-webservers/nginx-unit.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/configuring-webservers/nginx-unit.md#L3

[Microsoft.Acronyms] 'NGINX' has no definition.
Raw output
{"message": "[Microsoft.Acronyms] 'NGINX' has no definition.", "location": {"path": "cookbook/en/configuring-webservers/nginx-unit.md", "range": {"start": {"line": 3, "column": 27}}}, "severity": "INFO"}
Here is a sample configuration.

Check notice on line 4 in cookbook/en/configuring-webservers/nginx-unit.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/configuring-webservers/nginx-unit.md#L4

[Microsoft.Vocab] Verify your use of 'sample' with the A-Z word list.
Raw output
{"message": "[Microsoft.Vocab] Verify your use of 'sample' with the A-Z word list.", "location": {"path": "cookbook/en/configuring-webservers/nginx-unit.md", "range": {"start": {"line": 4, "column": 11}}}, "severity": "INFO"}

```json
{
Expand Down Expand Up @@ -41,6 +41,9 @@
"yii": {
"type": "php",
"user": "www-data",
"environment": {
"APP_ENV": "dev"
},
"targets": {
"direct": {
"root": "/path/to/app/public/"
Expand All @@ -58,3 +61,6 @@

You can also [set up](https://unit.nginx.org/configuration/#php) your PHP environment or supply a custom `php.ini`
in the same configuration.

In the above, note the usage of `environment`. Since the Yii3 application template is using environment variables,

Check notice on line 65 in cookbook/en/configuring-webservers/nginx-unit.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/configuring-webservers/nginx-unit.md#L65

[Microsoft.Vocab] Verify your use of 'above' with the A-Z word list.
Raw output
{"message": "[Microsoft.Vocab] Verify your use of 'above' with the A-Z word list.", "location": {"path": "cookbook/en/configuring-webservers/nginx-unit.md", "range": {"start": {"line": 65, "column": 8}}}, "severity": "INFO"}
this is a possible place to set them. In production environment remember to set `APP_ENV` to `prod`.
4 changes: 4 additions & 0 deletions cookbook/en/configuring-webservers/nginx.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Configuring web servers: Nginx

To use [Nginx](https://wiki.nginx.org/), install PHP as an [FPM SAPI](https://secure.php.net/install.fpm).

Check notice on line 3 in cookbook/en/configuring-webservers/nginx.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/configuring-webservers/nginx.md#L3

[Microsoft.Acronyms] 'FPM' has no definition.
Raw output
{"message": "[Microsoft.Acronyms] 'FPM' has no definition.", "location": {"path": "cookbook/en/configuring-webservers/nginx.md", "range": {"start": {"line": 3, "column": 61}}}, "severity": "INFO"}

Check notice on line 3 in cookbook/en/configuring-webservers/nginx.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/configuring-webservers/nginx.md#L3

[Microsoft.Acronyms] 'SAPI' has no definition.
Raw output
{"message": "[Microsoft.Acronyms] 'SAPI' has no definition.", "location": {"path": "cookbook/en/configuring-webservers/nginx.md", "range": {"start": {"line": 3, "column": 65}}}, "severity": "INFO"}
Use the following Nginx configuration, replacing `path/to/app/public` with the actual path for
`app/public` and `mysite.test` with the actual hostname to serve.

Expand Down Expand Up @@ -41,6 +41,7 @@
fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/var/run/php8-fpm.sock;
try_files $uri =404;
fastcgi_param APP_ENV "dev";
}

location ~* /\. {
Expand All @@ -54,3 +55,6 @@

Also, note that when running an HTTPS server, you need to add `fastcgi_param HTTPS on;` so that Yii
can detect if a connection is secure.

In the above, note the usage of `fastcgi_param APP_ENV`. Since the Yii3 application template is using environment variables,

Check notice on line 59 in cookbook/en/configuring-webservers/nginx.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/configuring-webservers/nginx.md#L59

[Microsoft.Vocab] Verify your use of 'above' with the A-Z word list.
Raw output
{"message": "[Microsoft.Vocab] Verify your use of 'above' with the A-Z word list.", "location": {"path": "cookbook/en/configuring-webservers/nginx.md", "range": {"start": {"line": 59, "column": 8}}}, "severity": "INFO"}
this is a possible place to set them. In production environment remember to set `APP_ENV` to `prod`.
Loading