servers:linux:nginx:php_info
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| servers:linux:nginx:php_info [2025/09/11 06:43] – external edit 127.0.0.1 | servers:linux:nginx:php_info [2026/11/11 19:58] (current) – new page (custom:phpinfo) Sean Rhone | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Information ====== | ||
| - | |||
| - | * PHP Info | ||
| - | * [[Information: | ||
| - | * https:// | ||
| - | |||
| - | ===== Prerequisites ===== | ||
| - | |||
| - | * [[Distros: | ||
| - | * [[Servers: | ||
| - | * [[Servers: | ||
| - | |||
| - | ====== PHP File ====== | ||
| - | |||
| - | sudo mkdir -p '/ | ||
| - | |||
| - | <?php | ||
| - | phpinfo(); | ||
| - | ?> | ||
| - | |||
| - | ====== nginx + PHP-FPM Configuration ====== | ||
| - | |||
| - | ===== PHP-FPM Socket ===== | ||
| - | |||
| - | sudo -e '/ | ||
| - | |||
| - | [php-info] | ||
| - | user = www-data | ||
| - | group = www-data | ||
| - | listen = / | ||
| - | listen.owner = www-data | ||
| - | listen.group = www-data | ||
| - | listen.allowed_clients = 127.0.0.1 | ||
| - | pm = ondemand | ||
| - | pm.max_children = 8 | ||
| - | pm.process_idle_timeout = 10s | ||
| - | |||
| - | ===== FastCGI ===== | ||
| - | |||
| - | sudo -e '/ | ||
| - | |||
| - | location ~ \.php$ { | ||
| - | try_files $uri =404; | ||
| - | include fastcgi.conf; | ||
| - | fastcgi_intercept_errors on; | ||
| - | fastcgi_index index.php; | ||
| - | fastcgi_param SCRIPT_FILENAME | ||
| - | fastcgi_param HTTPS on; | ||
| - | fastcgi_pass unix:/ | ||
| - | } | ||
| - | |||
| - | ===== Server Block ====== | ||
| - | |||
| - | sudo -e '/ | ||
| - | |||
| - | server { | ||
| - | listen ' | ||
| - | server_name ' | ||
| - | root '/ | ||
| - | index ' | ||
| - | | ||
| - | include '/ | ||
| - | | ||
| - | #access_log / | ||
| - | #error_log / | ||
| - | } | ||
| - | |||
| - | ==== Enable ==== | ||
| - | |||
| - | **** | ||
| - | |||
| - | sudo ln -s '/ | ||
| - | |||
| - | ====== Verify ====== | ||
| - | |||
| - | * http:// | ||
| - | |||
| - | ====== Cleanup ====== | ||
| - | |||
| - | **** | ||
| - | |||
| - | sudo unlink '/ | ||