nginx_php conf

From NAT, 6 Years ago, written in Plain Text, viewed 570 times.
URL https://code.nat.moe/view/85650756 Embed
Download Paste or View Raw
  1. server {
  2.         listen 80;
  3.         listen [::]:80 ipv6only=on;
  4.         server_name localhost;
  5.         root /usr/share/nginx/html;
  6.         index index.php index.html index.htm;
  7.  
  8.         location ~ \.php$ {
  9.                fastcgi_split_path_info ^(.+\.php)(/.+)$;
  10.                fastcgi_pass unix:/var/run/php5-fpm.sock;
  11.                fastcgi_index index.php;
  12.                include fastcgi_params;
  13.         }
  14. }
  15.  
  16. server {
  17.        listen 443;
  18.        listen [::]:443 ipv6only=on;
  19.        server_name localhost;
  20.        root /usr/share/nginx/html;
  21.        index index.php index.html index.htm;
  22.  
  23.        ssl on;
  24.        ssl_certificate cert.pem;
  25.        ssl_certificate_key cert.key;
  26.  
  27.        location ~ \.php$ {
  28.                fastcgi_split_path_info ^(.+\.php)(/.+)$;
  29.                fastcgi_pass unix:/var/run/php5-fpm.sock;
  30.                fastcgi_index index.php;
  31.                include fastcgi_params;
  32.         }
  33.  
  34.  
  35. }

Reply to "nginx_php conf"

Here you can reply to the paste above

captcha