socat instead of nginx

This commit is contained in:
Your Name 2024-02-29 03:01:27 +03:00
parent 04d0771a4f
commit f455d919bd

View file

@ -62,46 +62,31 @@
]; ];
}; };
#services.nginx.enable = true; systemd.services.grafanasocat43 = {
#services.nginx.virtualHosts."grafana_first" = { enable = true;
# forceSSL = false; description = "grafana vpn";
# listen = [{port = 2000; addr="0.0.0.0"; ssl=false;}]; wantedBy = [ "multi-user.target" ];
# locations."/".extraConfig = '' serviceConfig = {
# proxy_set_header Host $host; Restart = "on-failure";
# proxy_set_header X-Real-IP $remote_addr; RestartSec = "15";
# proxy_pass http://123.123.123.123:3000; Type="simple";
# ExecStart="${pkgs.socat}/bin/socat tcp-l:2000,fork,reuseaddr tcp:123.123.123.123:3000";
# proxy_set_header Upgrade $http_upgrade; DynamicUser=true;
# proxy_set_header Connection "upgrade"; };
# ''; };
# locations."/api/live/ws".extraConfig = ''
# proxy_pass http://123.123.123.123:3000; systemd.services.grafanasocat44 = {
# proxy_read_timeout 120; enable = true;
# proxy_pass_header X-XSRF-TOKEN; description = "grafana vpn";
# proxy_set_header Origin "http://123.123.123.123:3000"; wantedBy = [ "multi-user.target" ];
# proxy_http_version 1.1; serviceConfig = {
# proxy_set_header Upgrade $http_upgrade; Restart = "on-failure";
# proxy_set_header Connection "upgrade"; RestartSec = "15";
# ''; Type="simple";
#}; ExecStart="${pkgs.socat}/bin/socat tcp-l:2001,fork,reuseaddr tcp:123.123.123.123:3000";
#services.nginx.virtualHosts."grafana_second" = { DynamicUser=true;
# forceSSL = false; };
# listen = [{port = 2001; addr="0.0.0.0"; ssl=false;}]; };
# locations."/".extraConfig = ''
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_pass http://123.123.123.123:3000;
# '';
# locations."/api/live/ws".extraConfig = ''
# proxy_pass http://123.123.123.123:3000;
# proxy_read_timeout 120;
# proxy_pass_header X-XSRF-TOKEN;
# proxy_set_header Origin "http://123.123.123.123:3000";
# proxy_http_version 1.1;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "upgrade";
# '';
#};
system.stateVersion = "22.11"; system.stateVersion = "22.11";
} }