mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 20:29:17 +00:00
Fixing nginx configuration when server_name is not passed
This commit is contained in:
@@ -1,20 +1,27 @@
|
||||
include include.d/ssl-redirect.conf;
|
||||
|
||||
upstream backend {
|
||||
server {{ .Env.URL_BACKEND }};
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
index index.html;
|
||||
root /var/www/public/;
|
||||
|
||||
server_name {{ default .Env.FRONTEND_SERVER_NAME "_" }};
|
||||
{{ if .Env.FRONTEND_SERVER_NAME }}
|
||||
server_name {{ .Env.FRONTEND_SERVER_NAME }};
|
||||
{{else}}
|
||||
server_name _;
|
||||
{{end}}
|
||||
|
||||
include sites.d/frontend.conf;
|
||||
include include.d/letsencrypt.conf;
|
||||
}
|
||||
|
||||
{{if .Env.BACKEND_SERVER_NAME}}
|
||||
server {
|
||||
listen 80;
|
||||
server_name {{ default .Env.BACKEND_SERVER_NAME "_" }};
|
||||
server_name {{ .Env.BACKEND_SERVER_NAME }};
|
||||
include sites.d/backend.conf;
|
||||
include include.d/letsencrypt.conf;
|
||||
}
|
||||
}
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user