Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dataplane/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func handleNewConfig(w http.ResponseWriter, r *http.Request) {
}

func applyNginxConfig() error {
slog.Info("reloading nginx config")
cmd := exec.Command("nginx", "-t")

output, err := cmd.CombinedOutput()
Expand Down
2 changes: 1 addition & 1 deletion src/templates/nginx.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ limit_req_zone $binary_remote_addr zone={{ $.Username }}_{{ .ZoneName }}:{{ .Rat
{{/* Server blocks */}}
server {
listen 8080;
server_name _;
server_name {{ .Username }};

access_log /var/log/nginx/users/{{ .Username }}/access.log;
error_log /var/log/nginx/users/{{ .Username }}/error.log;
Expand Down
2 changes: 1 addition & 1 deletion src/watcher/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func Watch() {
}

confPath := filepath.Join(event.Name, "nginx.conf")
if _, err := os.Stat(confPath); err == nil {
if _, err = os.Stat(confPath); err == nil {
sendNginxToDataplane(confPath)
}
continue
Expand Down
Loading