servers:nginx:php_info
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
servers:nginx:php_info [2016/06/13 22:03] – [Enable] Sean Rhone | servers:nginx:php_info [2016/06/18 10:46] (current) – [Server Block] 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 '/ |