sync configs

This commit is contained in:
Sergey Paramoshkin 2025-02-02 18:52:07 +03:00
parent 5cafd349a7
commit 0686a172ce
3 changed files with 57 additions and 1 deletions

24
configs/admin/default Normal file
View File

@ -0,0 +1,24 @@
server {
server_name testbadmin.dot-dot.ru;
listen 443 ssl;
ssl_certificate /etc/nginx/ssl/dot2024.crt;
ssl_certificate_key /etc/nginx/ssl/dot2024.key;
index index.php index.html index.htm;
root /application/public;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
fastcgi_pass localhost:9000;
try_files $uri =404;
fastcgi_index index.php;
}
}

View File

@ -17,7 +17,7 @@ server {
error_log /var/log/nginx/testbadmin.dot-dot.ru_error.log; error_log /var/log/nginx/testbadmin.dot-dot.ru_error.log;
location / { location / {
proxy_pass http://testb-admin-1:80; proxy_pass https://testb-admin-1:443;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade'; proxy_set_header Connection 'upgrade';

View File

@ -115,4 +115,36 @@ server {
include fastcgi_params; include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
} }
location /mysql_exporter {
access_log /var/log/nginx/mysql_exporter_access.log json;
error_log /var/log/nginx/mysql_exporter_error.log;
#if ($allow = 0) {
# return 403;
#}
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_http_version 1.1;
proxy_pass http://mysqld-exporter:9104/metrics;
}
location /redis_exporter {
access_log /var/log/nginx/mysql_exporter_access.log json;
error_log /var/log/nginx/mysql_exporter_error.log;
#if ($allow = 0) {
# return 403;
#}
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_http_version 1.1;
proxy_pass http://redis-exporter:9121/metrics;
}
} }