Created
February 4, 2018 11:39
-
-
Save telingadigital/593f688c52b4e0ad7bb201c28dda077f to your computer and use it in GitHub Desktop.
Nginx Server Block Configuration for PHP in Windows with SSL
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 443 ssl http2; | |
server_name telingadigital.dev www.telingadigital.dev; | |
root c:/nginx/html/telingadigital/public/; | |
# SSL Conf | |
ssl_certificate c:/nginx/ssl/td.dev.pem; | |
ssl_certificate_key c:/nginx/ssl/td.dev.key; | |
ssl_session_cache shared:SSL:1m; | |
ssl_session_timeout 5m; | |
ssl_ciphers HIGH:!aNULL:!MD5; | |
ssl_prefer_server_ciphers on; | |
location / { | |
index index.php index.html index.htm; | |
try_files $uri $uri/ /index.php?q=$uri&$args; | |
} | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root html; | |
} | |
location ~ \.php$ { | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
location ~ /\.ht { | |
deny all; | |
} | |
} | |
server { | |
listen 80; | |
server_name telingadigital.dev www.telingadigital.dev; | |
return 301 https://$server_name$request_uri; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment