Use openresty node attributes in openresty templates
This commit is contained in:
		
							parent
							
								
									7f2805831c
								
							
						
					
					
						commit
						eab94090e8
					
				| @ -5,7 +5,7 @@ upstream _akkounts { | |||||||
| <% end %> | <% 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 |                  keys_zone=akkounts_cache:10m | ||||||
|                  max_size=1g inactive=120m use_temp_path=off; |                  max_size=1g inactive=120m use_temp_path=off; | ||||||
| 
 | 
 | ||||||
| @ -19,8 +19,8 @@ server { | |||||||
| 
 | 
 | ||||||
|   add_header Strict-Transport-Security "max-age=15768000"; |   add_header Strict-Transport-Security "max-age=15768000"; | ||||||
| 
 | 
 | ||||||
|   access_log <%= node[:nginx][:log_dir] %>/<%= @domain %>.access.log json; |   access_log <%= node[:openresty][:log_dir] %>/<%= @domain %>.access.log json; | ||||||
|   error_log <%= node[:nginx][:log_dir] %>/<%= @domain %>.error.log warn; |   error_log <%= node[:openresty][:log_dir] %>/<%= @domain %>.error.log warn; | ||||||
| 
 | 
 | ||||||
|   root <%= @root_dir %>; |   root <%= @root_dir %>; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -15,8 +15,8 @@ server { | |||||||
| 
 | 
 | ||||||
|   add_header 'Strict-Transport-Security' 'max-age=31536000'; |   add_header 'Strict-Transport-Security' 'max-age=31536000'; | ||||||
| 
 | 
 | ||||||
|   access_log <%= node[:nginx][:log_dir] %>/<%= @domain %>.access.log json; |   access_log <%= node[:openresty][:log_dir] %>/<%= @domain %>.access.log json; | ||||||
|   error_log <%= node[:nginx][:log_dir] %>/<%= @domain %>.error.log warn; |   error_log <%= node[:openresty][:log_dir] %>/<%= @domain %>.error.log warn; | ||||||
| 
 | 
 | ||||||
|   location /kredits/ { |   location /kredits/ { | ||||||
|     add_header 'Access-Control-Allow-Origin' '*' always; |     add_header 'Access-Control-Allow-Origin' '*' always; | ||||||
|  | |||||||
| @ -12,8 +12,8 @@ server { | |||||||
| 
 | 
 | ||||||
|   add_header Strict-Transport-Security "max-age=15768000"; |   add_header Strict-Transport-Security "max-age=15768000"; | ||||||
| 
 | 
 | ||||||
|   access_log <%= node[:nginx][:log_dir] %>/<%= @server_name %>.access.log json; |   access_log <%= node[:openresty][:log_dir] %>/<%= @server_name %>.access.log json; | ||||||
|   error_log <%= node[:nginx][:log_dir] %>/<%= @server_name %>.error.log warn; |   error_log <%= node[:openresty][:log_dir] %>/<%= @server_name %>.error.log warn; | ||||||
| 
 | 
 | ||||||
|   location / { |   location / { | ||||||
|     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||||||
|  | |||||||
| @ -12,8 +12,8 @@ server { | |||||||
| 
 | 
 | ||||||
|   add_header Strict-Transport-Security "max-age=15768000"; |   add_header Strict-Transport-Security "max-age=15768000"; | ||||||
| 
 | 
 | ||||||
|   access_log <%= node[:nginx][:log_dir] %>/<%= @server_name %>.access.log json; |   access_log <%= node[:openresty][:log_dir] %>/<%= @server_name %>.access.log json; | ||||||
|   error_log <%= node[:nginx][:log_dir] %>/<%= @server_name %>.error.log warn; |   error_log <%= node[:openresty][:log_dir] %>/<%= @server_name %>.error.log warn; | ||||||
| 
 | 
 | ||||||
|   location / { |   location / { | ||||||
|     # Increase number of buffers. Default is 8 |     # Increase number of buffers. Default is 8 | ||||||
|  | |||||||
| @ -12,8 +12,8 @@ server { | |||||||
| 
 | 
 | ||||||
|   add_header Strict-Transport-Security "max-age=15768000"; |   add_header Strict-Transport-Security "max-age=15768000"; | ||||||
| 
 | 
 | ||||||
|   access_log <%= node[:nginx][:log_dir] %>/<%= @domain %>.access.log json; |   access_log <%= node[:openresty][:log_dir] %>/<%= @domain %>.access.log json; | ||||||
|   error_log <%= node[:nginx][:log_dir] %>/<%= @domain %>.error.log warn; |   error_log <%= node[:openresty][:log_dir] %>/<%= @domain %>.error.log warn; | ||||||
| 
 | 
 | ||||||
|   location / { |   location / { | ||||||
|     if ($request_method = 'OPTIONS') { |     if ($request_method = 'OPTIONS') { | ||||||
|  | |||||||
| @ -7,7 +7,9 @@ server { | |||||||
| 
 | 
 | ||||||
|   root /var/www/<%= @domain %>/public; |   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_static on; | ||||||
|   gzip_comp_level 5; |   gzip_comp_level 5; | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user