updated nginx state

This commit is contained in:
Paul 2023-06-06 09:24:24 +02:00
parent c5f551757a
commit d9f201194f
2 changed files with 24 additions and 17 deletions

View File

@ -4,18 +4,25 @@ nginx-pkg:
pkg.installed:
- pkgs: {{ nginx.packages }}
nginx-logs-user-acl:
acl.present:
nginx-logs-perms:
file.directory:
- name: /var/log/nginx
- acl_type: user
- acl_name: www-data
- perms: rwx
- recurse: true
- user: www-data
- group: root
- mode: 0775
nginx-logs-group-acl:
acl.present:
- name: /var/log/nginx
- acl_type: group
- acl_name: www-data
- perms: rwx
- recurse: true
#nginx-logs-user-acl:
# acl.present:
# - name: /var/log/nginx
# - acl_type: user
# - acl_name: www-data
# - perms: rwx
# - recurse: true
#
#nginx-logs-group-acl:
# acl.present:
# - name: /var/log/nginx
# - acl_type: group
# - acl_name: www-data
# - perms: rwx
# - recurse: true

View File

@ -24,6 +24,10 @@ http {
include ssl_params;
charset utf-8;
real_ip_header proxy_protocol;
set_real_ip_from 127.0.0.1;
set_real_ip_from ::1;
{%- if nginx.config.geoip %}
geoip2 /usr/share/GeoIP/GeoLite2-ASN.mmdb {
$geoip2_asn default=0 autonomous_system_number;
@ -71,10 +75,6 @@ http {
root /var/www/html;
index index.html;
real_ip_header X-Forwarded-For;
set_real_ip_from 127.0.0.1;
set_real_ip_from ::1;
location = / {
return 404;
}