Created
August 5, 2017 14:18
-
-
Save DZuz14/860d0a6c6752c6048780305d340b37a2 to your computer and use it in GitHub Desktop.
Nginx HTTPS Config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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