Make kosmos.org the default nginx vhost

This commit is contained in:
Râu Cao 2024-08-04 16:51:57 +02:00
parent a99f7f7574
commit d53ba42a1d
Signed by: raucao
GPG Key ID: 37036C356E56CC51
2 changed files with 29 additions and 2 deletions

View File

@ -0,0 +1,18 @@
# Generated by Chef
server {
server_name <%= @domain %>;
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
listen [::]:443 ssl http2;
root /var/www/<%= @domain %>/public;
access_log <%= node[:openresty][:log_dir] %>/<%= @domain %>.access.log;
error_log <%= node[:openresty][:log_dir] %>/<%= @domain %>.error.log warn;
gzip_static on;
gzip_comp_level 5;
ssl_certificate <%= @ssl_cert %>;
ssl_certificate_key <%= @ssl_key %>;
}

View File

@ -1,9 +1,18 @@
# Generated by Chef
server {
server_name _;
listen 80 default_server;
location / {
return 301 https://<%= @domain %>;
}
}
server {
server_name <%= @domain %>;
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
listen [::]:443 ssl http2;
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
root /var/www/<%= @domain %>/public;