Ecommerce Shopify WordPress Discussion

WordPress behind nginx reverse proxy on custom location

I'm trying to configure docker wordpress container behind nginx proxy on custom location /api instead of /. After going to my browser redirects me to (it removes /api/ part) but when I enter manually the website opens. Below is my configuration: #docker-compose version: '3.8' services: wp: image: ${DOCKER_REGISTRY}/example/xxx-wordpress:${CI_COMMIT_SHORT_SHA} environment: - WORDPRESS_DB_HOST=${WORDPRESS_DB_HOST} - WORDPRESS_DB_USER=${WORDPRESS_DB_USER} - WORDPRESS_DB_PASSWORD=${WORDPRESS_DB_PASSWORD} - WORDPRESS_DB_NAME=${WORDPRESS_DB_NAME} - | WORDPRESS_CONFIG_EXTRA: define('WP_HOME',''); define('WP_SITEURL','http://example/api'); define('FORCE_SSL_ADMIN', true); ports: - "8080:80" networks: - mynet volumes: - wordpress:/var/www/html restart: always extra_hosts: - "db-srv:$HOST_DB" networks: mynet: volumes: wordpress: #nginx location location ^~ /api/ { include conf.d/common/maintenance_conditions.conf; #request headers include conf.d/utils/proxy_request_headers.conf; include conf.d/utils/proxy_request_headers_x.conf; proxy_pass http://IP:8080/; proxy_no_cache 1; #response headers include conf.d/utils/proxy_response_headers.conf; add_header X-Cache-Status $upstream_cache_status; } Nginx headers(imported from files): #requests proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-Port 443; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Request-ID $request_id; proxy_set_header X-Forwarded-Prefix /api; #reposnse add_header X-Frame-Options SAMEORIGIN always; add_header X-Content-Type-Options nosniff always; add_header X-XSS-Protection "1; mode=block" always; add_header Strict-Transport-Security "max-age=63072000" always; add_header X-Request-ID $request_id always; Any idea how to configure wordpress "root context path" as /api/ ?? I would like to serve wordpress on* for instance /
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.