Skip to content

Instantly share code, notes, and snippets.

@BastinRobin
Created September 10, 2019 15:25
Show Gist options
  • Select an option

  • Save BastinRobin/a5f255968cf94b25ec802c4a659a3da2 to your computer and use it in GitHub Desktop.

Select an option

Save BastinRobin/a5f255968cf94b25ec802c4a659a3da2 to your computer and use it in GitHub Desktop.
Nginx Subdomain
# Expires map
map $sent_http_content_type $expires {
default off;
text/html epoch;
text/css max;
application/javascript max;
~image/ max;
}
server {
listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
expires $expires;
root /var/www/attendfy/public;
index index.html index.htm index.php;
server_name _;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment