WIP Migrate Gitea proxy to openresty

TODO: Make nginx_ssh stream resource work with openresty cookbook
This commit is contained in:
Râu Cao
2023-07-26 14:15:46 +02:00
parent 1681942fb1
commit 4b14297f83
6 changed files with 32 additions and 58 deletions

View File

@@ -4,23 +4,14 @@ upstream _gitea_web {
}
server {
<% if File.exist?(@ssl_cert) && File.exist?(@ssl_key) -%>
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name <%= @server_name %>;
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate <%= @ssl_cert %>;
ssl_certificate_key <%= @ssl_key %>;
add_header Strict-Transport-Security "max-age=31536000";
<% else -%>
listen 80;
server_name <%= @server_name %>;
location /.well-known {
root "/var/www/<%= @server_name %>";
}
<% end -%>
client_max_body_size 20M;