nixbld: optimize web server settings
This commit is contained in:
parent
049ef39c29
commit
820ede4ac3
@ -252,6 +252,7 @@ ACTION=="add", SUBSYSTEM=="tty", \
|
|||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
|
recommendedGzipSettings = true;
|
||||||
virtualHosts = let
|
virtualHosts = let
|
||||||
mainWebsite = {
|
mainWebsite = {
|
||||||
addSSL = true;
|
addSSL = true;
|
||||||
@ -260,8 +261,17 @@ ACTION=="add", SUBSYSTEM=="tty", \
|
|||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
error_page 404 /404.html;
|
error_page 404 /404.html;
|
||||||
'';
|
'';
|
||||||
|
locations."^~ /fonts/".extraConfig = ''
|
||||||
|
expires 60d;
|
||||||
|
'';
|
||||||
|
locations."^~ /js/".extraConfig = ''
|
||||||
|
expires 60d;
|
||||||
|
'';
|
||||||
locations."/MathJax" = {
|
locations."/MathJax" = {
|
||||||
alias = "/var/www/MathJax";
|
alias = "/var/www/MathJax";
|
||||||
|
extraConfig = ''
|
||||||
|
expires 60d;
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# legacy URLs, redirect to avoid breaking people's bookmarks
|
# legacy URLs, redirect to avoid breaking people's bookmarks
|
||||||
|
Loading…
Reference in New Issue
Block a user