Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| 04-linux:85-nginx [2019/02/10 02:44] – Roge | 04-linux:85-nginx [2019/02/11 01:27] (Version actuelle) – [Configure PHP] Roge | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| ====== Nginx ====== | ====== Nginx ====== | ||
| + | |||
| + | https:// | ||
| + | |||
| ===== Install ===== | ===== Install ===== | ||
| + | |||
| + | '' | ||
| + | |||
| + | |||
| + | ===== Check ===== | ||
| + | |||
| + | '' | ||
| + | |||
| + | [[http:// | ||
| + | |||
| + | Check Nginx configuration : | ||
| + | |||
| + | '' | ||
| + | |||
| + | |||
| + | ===== Manage ===== | ||
| + | |||
| + | '' | ||
| + | |||
| + | '' | ||
| + | |||
| + | '' | ||
| + | |||
| + | '' | ||
| + | |||
| + | |||
| + | By default, Nginx is configured to start automatically when the server boots. If this is not what you want, you can disable this behavior by typing: | ||
| + | |||
| + | '' | ||
| + | |||
| + | To re-enable the service to start up at boot, you can type: | ||
| + | |||
| + | '' | ||
| + | |||
| + | ===== Install PHP ===== | ||
| + | |||
| + | |||
| + | '' | ||
| + | |||
| + | |||
| + | Nginx utilise une socket pour accéder à PHP. | ||
| + | |||
| + | |||
| + | ==== Configure PHP ==== | ||
| + | |||
| + | |||
| + | '' | ||
| + | |||
| + | Check '' | ||
| + | |||
| + | ==== Configure site PHP ==== | ||
| + | |||
| + | Dans la configuration de site PHP (/ | ||
| < | < | ||
| - | sudo apt install nginx | + | location ~ \.php$ { |
| + | try_files $uri =404; | ||
| + | fastcgi_split_path_info ^(.+\.php)(/ | ||
| + | fastcgi_pass unix:/ | ||
| + | fastcgi_index index.php; | ||
| + | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
| + | include fastcgi_params; | ||
| + | } | ||
| </ | </ | ||