Skip to content

Instantly share code, notes, and snippets.

@DZuz14
Created August 5, 2017 14:18
Show Gist options
  • Save DZuz14/860d0a6c6752c6048780305d340b37a2 to your computer and use it in GitHub Desktop.
Save DZuz14/860d0a6c6752c6048780305d340b37a2 to your computer and use it in GitHub Desktop.
Nginx HTTPS Config
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name somedomain.com www.somedomain.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
server_name somedomain.com www.somedomain.com;
root /var/www/html
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment