initial commit
This commit is contained in:
commit
4014d5e658
30 changed files with 911 additions and 0 deletions
31
hosts/crayon/www/squi.bid.nix
Normal file
31
hosts/crayon/www/squi.bid.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ phpsock, pkgs, ... }:
|
||||
{
|
||||
serverAliases = ["www.squi.bid"];
|
||||
root = "/var/www/squi.bid"; # TODO: make declarative
|
||||
|
||||
locations = {
|
||||
"/" = {
|
||||
tryFiles = "$uri $uri.html $uri/ @extensionless-php";
|
||||
index = "index.html index.htm index.php";
|
||||
};
|
||||
"~ \\.php$" = {
|
||||
extraConfig = ''
|
||||
fastcgi_pass unix:${phpsock};
|
||||
include ${pkgs.nginx}/conf/fastcgi.conf;
|
||||
expires 3m;
|
||||
add_header Cache-Control "max-age=180, public";
|
||||
'';
|
||||
};
|
||||
"~* \\.(?:css|js|jpg|png)$" = {
|
||||
extraConfig = ''
|
||||
expires 1y;
|
||||
access_log off;
|
||||
add_header Cache-Control "max-age=31556952, public";
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
# https
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue