( Ubunutu 20 ) Apache2 Proxypass with wordpress
-
I have installed and configured WordPress on my server using also apach2 virtualhosts.
I made a virtualhost with this config<VirtualHost *:80> ServerAdmin [email protected] ServerName yourluxuryroad.com ServerAlias www.yourluxuryroad.com DocumentRoot /var/www/yourluxuryroad ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined RewriteEngine on RewriteCond %{SERVER_NAME} =www.yourluxuryroad.com [OR] RewriteCond %{SERVER_NAME} =yourluxuryroad.com RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] ProxyPreserveHost On ProxyRequests Off ProxyPass /node-yrl-book http://localhost:5000 ProxyPassReverse /node-yrl-book http://localhost:5000 </VirtualHost> <VirtualHost *:443> ServerName yourluxuryroad.com ServerAlias www.yourluxuryroad.com ProxyPreserveHost On ProxyRequests Off ProxyPass /node-yrl-book http://localhost:5000 ProxyPassReverse /node-yrl-book http://localhost:5000 </VirtualHost> <Directory /var/www/yourluxuryroad/> AllowOverride All </Directory>As you can see from the config i’m trying to set the ProxyPass directive for redirect the requests recived on the path
/node-yrl-bookto anodejsservice ( made usingexpressjs) at port 5000 but this is not working, instead of getting a redirect to that service i get the 404 Page not found wordpress page.If I make a request at
my_ip/node-yrl-bookinstead it works correctly and i am redirected to the service at port :5000I suppose that i’m missing something in my configuration but i’m not understanding what..
Maybe is something in wordpress that has to be changed?The page I need help with: [log in to see the link]
The topic ‘( Ubunutu 20 ) Apache2 Proxypass with wordpress’ is closed to new replies.