Use openresty node attributes in openresty templates

This commit is contained in:
Râu Cao 2023-07-31 15:07:35 +02:00
parent 7f2805831c
commit eab94090e8
Signed by: raucao
GPG Key ID: 15E65F399D084BA9
6 changed files with 14 additions and 12 deletions

View File

@ -5,7 +5,7 @@ upstream _akkounts {
<% end %>
}
proxy_cache_path /var/cache/nginx/akkounts levels=1:2
proxy_cache_path <%= node[:openresty][:cache_dir] %>/akkounts levels=1:2
keys_zone=akkounts_cache:10m
max_size=1g inactive=120m use_temp_path=off;
@ -19,8 +19,8 @@ server {
add_header Strict-Transport-Security "max-age=15768000";
access_log <%= node[:nginx][:log_dir] %>/<%= @domain %>.access.log json;
error_log <%= node[:nginx][:log_dir] %>/<%= @domain %>.error.log warn;
access_log <%= node[:openresty][:log_dir] %>/<%= @domain %>.access.log json;
error_log <%= node[:openresty][:log_dir] %>/<%= @domain %>.error.log warn;
root <%= @root_dir %>;

View File

@ -15,8 +15,8 @@ server {
add_header 'Strict-Transport-Security' 'max-age=31536000';
access_log <%= node[:nginx][:log_dir] %>/<%= @domain %>.access.log json;
error_log <%= node[:nginx][:log_dir] %>/<%= @domain %>.error.log warn;
access_log <%= node[:openresty][:log_dir] %>/<%= @domain %>.access.log json;
error_log <%= node[:openresty][:log_dir] %>/<%= @domain %>.error.log warn;
location /kredits/ {
add_header 'Access-Control-Allow-Origin' '*' always;

View File

@ -12,8 +12,8 @@ server {
add_header Strict-Transport-Security "max-age=15768000";
access_log <%= node[:nginx][:log_dir] %>/<%= @server_name %>.access.log json;
error_log <%= node[:nginx][:log_dir] %>/<%= @server_name %>.error.log warn;
access_log <%= node[:openresty][:log_dir] %>/<%= @server_name %>.access.log json;
error_log <%= node[:openresty][:log_dir] %>/<%= @server_name %>.error.log warn;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

View File

@ -12,8 +12,8 @@ server {
add_header Strict-Transport-Security "max-age=15768000";
access_log <%= node[:nginx][:log_dir] %>/<%= @server_name %>.access.log json;
error_log <%= node[:nginx][:log_dir] %>/<%= @server_name %>.error.log warn;
access_log <%= node[:openresty][:log_dir] %>/<%= @server_name %>.access.log json;
error_log <%= node[:openresty][:log_dir] %>/<%= @server_name %>.error.log warn;
location / {
# Increase number of buffers. Default is 8

View File

@ -12,8 +12,8 @@ server {
add_header Strict-Transport-Security "max-age=15768000";
access_log <%= node[:nginx][:log_dir] %>/<%= @domain %>.access.log json;
error_log <%= node[:nginx][:log_dir] %>/<%= @domain %>.error.log warn;
access_log <%= node[:openresty][:log_dir] %>/<%= @domain %>.access.log json;
error_log <%= node[:openresty][:log_dir] %>/<%= @domain %>.error.log warn;
location / {
if ($request_method = 'OPTIONS') {

View File

@ -7,7 +7,9 @@ server {
root /var/www/<%= @domain %>/public;
access_log off;
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;