Feat: mount /var/www/html to the nginx container and add config to protect against CVE-2019-11043
This commit is contained in:
parent
7ea092737a
commit
09cbf70e13
2 changed files with 9 additions and 1 deletions
|
@ -79,6 +79,10 @@
|
||||||
podman_nginx_primary_hostname: "{{ podman_cleaninsights_web_hostname }}"
|
podman_nginx_primary_hostname: "{{ podman_cleaninsights_web_hostname }}"
|
||||||
podman_nginx_systemd_service_slice: cleaninsights.slice
|
podman_nginx_systemd_service_slice: cleaninsights.slice
|
||||||
podman_nginx_systemd_service_requires: ["matomo"]
|
podman_nginx_systemd_service_requires: ["matomo"]
|
||||||
|
podman_nginx_additional_volumes:
|
||||||
|
- src: "/home/{{ podman_cleaninsights_podman_rootless_user }}/matomo"
|
||||||
|
dest: "/var/www/html"
|
||||||
|
options: "ro"
|
||||||
|
|
||||||
- name: create nginx configuration file
|
- name: create nginx configuration file
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
|
|
|
@ -41,8 +41,8 @@ server {
|
||||||
|
|
||||||
location ~ ^/(index|matomo|cleaninsights|piwik|js/index|plugins/HeatmapSessionRecording/configs).php {
|
location ~ ^/(index|matomo|cleaninsights|piwik|js/index|plugins/HeatmapSessionRecording/configs).php {
|
||||||
# regex to split $uri to $fastcgi_script_name and $fastcgi_path
|
# regex to split $uri to $fastcgi_script_name and $fastcgi_path
|
||||||
|
try_files $fastcgi_script_name =404;
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
|
|
||||||
# Check that the PHP script exists before passing it
|
# Check that the PHP script exists before passing it
|
||||||
#try_files $fastcgi_script_name =404;
|
#try_files $fastcgi_script_name =404;
|
||||||
|
|
||||||
|
@ -59,6 +59,10 @@ server {
|
||||||
return 403;
|
return 403;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ =404;
|
||||||
|
}
|
||||||
|
|
||||||
# deny access to all cleaninsights.ini file
|
# deny access to all cleaninsights.ini file
|
||||||
location ~ cleaninsights.ini {
|
location ~ cleaninsights.ini {
|
||||||
return 403;
|
return 403;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue