Ecommerce Shopify WordPress Discussion

Configure nginx using reverse_proxy and wordgpress for subdirectory /blog

I wish to configure nginx with a reverse_proxy (proxy_pass) that routes into my app in localhost:3000 and the location /blog it routes to wordpress. The config file I have is: server { listen [::]:443 ssl ipv6only=on; listen 443 ssl; #begin ssl_certificates ..... #end ssl_certificates server_name example.com; root /var/www/example.com; #WP files are in /var/www/example.com/blog index index.php; location /blog { alias /var/www/example.com/blog; #the WP files are in /var/www/example.com/blog also tried /var/www/example.com index index.php; try_files $uri $uri/ /blog/index.php?$args; location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; # Adjust the version based on your PHP-FPM version fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } location ~ /\.ht { deny all; } location / { proxy_pass http://127.0.0.1:3000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_redirect off; } } server { listen 80; listen [::]:80 ipv6only=on; server_name example.com; location / { proxy_pass http://localhost:3000; } } When I go to path https://example.com/blog it shows a 404. Other configs I tried is moving the WP files to /var/www/example.com, nevertheless I don't think this is the issue because is actually not redirecting to the static files. I tried using two proxy_passand that actually works: ... location / { proxy_pass http://localhost:3000; } location /blog { proxy_pass http://localhost:9000; } ... If there is not workaround, do you know any other CMS that might work like this?
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.