Skip to content

Instantly share code, notes, and snippets.

@msg7086
Created June 18, 2014 05:46
Show Gist options
  • Save msg7086/db5ce9613dc4b48e1ed1 to your computer and use it in GitHub Desktop.
Save msg7086/db5ce9613dc4b48e1ed1 to your computer and use it in GitHub Desktop.
server {
listen 80;
listen [::]:80;
listen 443 ssl spdy;
listen [::]:443 ssl spdy;
ssl_certificate /etc/nginx/ssl/7086.in.crt;
ssl_certificate_key /etc/nginx/ssl/7086.in.key;
root /var/www/msg7086/mj.7086.in/;
index index.php index.htm index.html;
server_name mj.7086.in;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
access_log /var/log/nginx/mj.log;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
# With php5-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm-msg7086.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment