fix nginx failing to reload fast
This commit is contained in:
parent
f488ba0672
commit
c452a3125b
1 changed files with 1 additions and 33 deletions
|
@ -10,21 +10,6 @@ export class NginxController {
|
||||||
this.enabled_conf_dir = enabled_conf_dir;
|
this.enabled_conf_dir = enabled_conf_dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
server {
|
|
||||||
server_name barnulf.net;
|
|
||||||
location / {
|
|
||||||
proxy_pass http://barnulf.net:8051;
|
|
||||||
}
|
|
||||||
|
|
||||||
listen [::]:443 ssl ipv6only=on; # managed by Certbot
|
|
||||||
listen 443 ssl; # managed by Certbot
|
|
||||||
ssl_certificate /etc/letsencrypt/live/barnulf.net/fullchain.pem; # managed by Certbot
|
|
||||||
ssl_certificate_key /etc/letsencrypt/live/barnulf.net/privkey.pem; # managed by Certbot
|
|
||||||
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
public async add_proxy(domain: string, port: number, conf_dir: string, tls: boolean) {
|
public async add_proxy(domain: string, port: number, conf_dir: string, tls: boolean) {
|
||||||
const conf_file_path = await this.set_http_config(domain, port, conf_dir);
|
const conf_file_path = await this.set_http_config(domain, port, conf_dir);
|
||||||
await this.reload();
|
await this.reload();
|
||||||
|
@ -114,23 +99,6 @@ server {
|
||||||
}
|
}
|
||||||
|
|
||||||
private async reload() {
|
private async reload() {
|
||||||
await run("systemctl", "restart", "nginx");
|
await run("systemctl", "reload", "nginx");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
server {
|
|
||||||
if ($host = barnulf.net) {
|
|
||||||
return 301 https://$host$request_uri;
|
|
||||||
} # managed by Certbot
|
|
||||||
|
|
||||||
|
|
||||||
listen 80;
|
|
||||||
listen [::]:80;
|
|
||||||
server_name barnulf.net;
|
|
||||||
return 404; # managed by Certbot
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue