Created
April 8, 2021 16:30
-
-
Save jameelmoses/9c7665bb323dd3f003c518b89aa2146f to your computer and use it in GitHub Desktop.
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; | |
listen [::]:80; | |
server_name local.{{host}}; | |
location / { | |
rewrite ^ https://$host$request_uri? permanent; | |
} | |
} | |
server { | |
listen 443 ssl http2; | |
listen [::]:443 ssl http2; | |
server_name local.{{host}}; | |
add_header Strict-Transport-Security "max-age=31536000" always; | |
ssl_session_cache shared:SSL:20m; | |
ssl_session_timeout 10m; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_prefer_server_ciphers on; | |
ssl_ciphers "ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!ADH:!AECDH:!MD5;"; | |
root ~/Sites/{{root}}/dist/web; | |
index index.php; | |
access_log ~/Sites/{{root}}/data/log/nginx/access.log; | |
error_log ~/Sites/{{root}}/data/log/nginx/error.log; | |
ssl_certificate ~/Sites/{{root}}/certs/local.{{host}}.crt; | |
ssl_certificate_key ~/Sites/{{root}}/certs/local.{{host}}.key; | |
gzip_http_version 1.0; | |
gzip_disable "msie6"; | |
gzip_vary on; | |
gzip_proxied any; | |
gzip_buffers 16 8k; | |
gzip_min_length 256; | |
client_max_body_size 100M; | |
location / { | |
try_files $uri $uri/ /index.php$is_args$args; | |
} | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param PATH_INFO $fastcgi_path_info; | |
fastcgi_buffers 16 16k; | |
fastcgi_buffer_size 32k; | |
} | |
include ~/Sites/{{root}}/dist/web/nginx.conf; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment