Skip to content

Instantly share code, notes, and snippets.

@kylescottmcgill
Last active February 7, 2017 23:47
Show Gist options
  • Select an option

  • Save kylescottmcgill/5f7df7e858c9c2c1ace3b4a87c80232d to your computer and use it in GitHub Desktop.

Select an option

Save kylescottmcgill/5f7df7e858c9c2c1ace3b4a87c80232d to your computer and use it in GitHub Desktop.
server {
listen 80 default_server;
server_name _;
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
server_name ibuyfilm.net;
ssl_certificate /etc/nginx/ssl/nginx.crt;
ssl_certificate_key /etc/nginx/ssl/nginx.key;
root /var/www/html;
index index.php;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment