nginx

Remove subpath (context bonita) in nginx or apache

Hello,
I'm having trouble removing path /bonita from the url

I try with two ways APCHE or NGINX result is the same

````


ServerName bonita.befirst.com

ErrorLog ${APACHE_LOG_DIR}/bonita_befirst_com/error.log
CustomLog ${APACHE_LOG_DIR}/bonita_befirst_com/access.log combined

RewriteEngine on
RewriteRule "^(?!/bonita)(.*)$" "/bonita$1" [R,L]
RewriteRule "^/(.*)" "http://127.0.0.1:8080/$1" [P]

ProxyRequests Off
ProxyPreserveHost on

Exclude pattern does not match with this url

HEllo do someone already have this problem? Remove subpath (context root) in nginx for a java app
i tried to remove /bonita in url

==> /var/log/apache2/access.log <==
81.220.52.20 - - [15/Oct/2022:22:11:18 +0000] "GET /bonita/apple-touch-icon.png HTTP/1.1" 404 1149 "-" "Safari/17614.1.25.9.10 CFNetwork/1335.0.3 Darwin/21.6.0"

Notifications