Skip to content

Instantly share code, notes, and snippets.

@davibennun
Created May 30, 2022 13:40
Show Gist options
  • Save davibennun/17be164ea34592ce53629a8440430414 to your computer and use it in GitHub Desktop.
Save davibennun/17be164ea34592ce53629a8440430414 to your computer and use it in GitHub Desktop.
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate /opt/homebrew/etc/nginx/ssl/{{host}}.crt;
ssl_certificate_key /opt/homebrew/etc/nginx/ssl/{{host}}.key;
ssl_ciphers HIGH:!aNULL:!MD5;
# listen 80;
server_name {{host}};
root {{root}};
index index.html index.htm index.php;
charset utf-8;
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
access_log off;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment