wolf.r: more relevant nginx data
This commit is contained in:
parent
341d11575d
commit
306653db95
@ -34,6 +34,22 @@ in
|
|||||||
# powerraw usb serial to mqtt and raw socket
|
# powerraw usb serial to mqtt and raw socket
|
||||||
<stockholm/krebs/2configs/shack/powerraw.nix>
|
<stockholm/krebs/2configs/shack/powerraw.nix>
|
||||||
|
|
||||||
|
{ # do not log to /var/spool/log
|
||||||
|
services.nginx.appendHttpConfig = ''
|
||||||
|
map $request_method $loggable {
|
||||||
|
default 1;
|
||||||
|
GET 0;
|
||||||
|
}
|
||||||
|
log_format vhost '$host $remote_addr - $remote_user '
|
||||||
|
'[$time_local] "$request" $status '
|
||||||
|
'$body_bytes_sent "$http_referer" '
|
||||||
|
'"$http_user_agent"';
|
||||||
|
error_log stderr;
|
||||||
|
access_log syslog:server=unix:/dev/log vhost;
|
||||||
|
'';
|
||||||
|
services.journald.rateLimitBurst = 10000;
|
||||||
|
}
|
||||||
|
|
||||||
# create samba share for anonymous usage with the laser and 3d printer pc
|
# create samba share for anonymous usage with the laser and 3d printer pc
|
||||||
<stockholm/krebs/2configs/shack/share.nix>
|
<stockholm/krebs/2configs/shack/share.nix>
|
||||||
|
|
||||||
|
@ -8,6 +8,11 @@ in
|
|||||||
networking.firewall.allowedTCPPorts = [ port ]; # for legacy applications
|
networking.firewall.allowedTCPPorts = [ port ]; # for legacy applications
|
||||||
networking.firewall.allowedUDPPorts = [ collectd-port ];
|
networking.firewall.allowedUDPPorts = [ collectd-port ];
|
||||||
services.nginx.virtualHosts."influx.shack" = {
|
services.nginx.virtualHosts."influx.shack" = {
|
||||||
|
# Disable constant GET request logging.
|
||||||
|
# $loggable map is defined in 1/wolf
|
||||||
|
extraConfig = ''
|
||||||
|
access_log syslog:server=unix:/dev/log combined if=$loggable;
|
||||||
|
'';
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://localhost:${toString port}/";
|
proxyPass = "http://localhost:${toString port}/";
|
||||||
};
|
};
|
||||||
|
@ -28,6 +28,9 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts."openhab.shack" = {
|
services.nginx.virtualHosts."openhab.shack" = {
|
||||||
|
extraConfig = ''
|
||||||
|
access_log syslog:server=unix:/dev/log combined if=$loggable;
|
||||||
|
'';
|
||||||
serverAliases = [ "lightapi.shack" ];
|
serverAliases = [ "lightapi.shack" ];
|
||||||
locations."/power/".proxyPass = "http://localhost:${port}/power/";
|
locations."/power/".proxyPass = "http://localhost:${port}/power/";
|
||||||
locations."/lounge/".proxyPass = "http://localhost:${port}/lounge/";
|
locations."/lounge/".proxyPass = "http://localhost:${port}/lounge/";
|
||||||
|
Loading…
Reference in New Issue
Block a user