Boa tarde, estou tentando configurar o mTLS para cadastrar o wwebhook da chave pix, estou usando nginx com PHP, ja configurei o .cong do nginx e está da seguinte forma
server {
server_name {URL_BASE};
root /var/www/html/public;
listen [::]:443 ssl ipv6only=on;
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/privkey.pem;
ssl_dhparam /etc/ssl/certs/dhparam.pem;
ssl_client_certificate /etc/nginx/ssl/chain-pix-webhooks-prod.crt;
ssl_verify_client optional;
ssl_verify_depth 3;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
index index.html index.htm index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known). {
deny all;
}
location /api/webhook/efi/pix {
if ($ssl_client_verify != SUCCESS) {
return 403;
}
proxy_pass {URL_BASE}/api/webhooks/efi/pix;
}
}
Ao tentar deixar o proxy_pass sem a url junto, ele da erro ao tentar iniciar o nginx
Jan 02 19:01:22 ip-172-31-42-174 nginx[3444869]: nginx: [emerg] invalid URL prefix in /etc/nginx/sites-enabled/default:86
Jan 02 19:01:22 ip-172-31-42-174 nginx[3444869]: nginx: configuration file /etc/nginx/nginx.conf test failed