I am running a webserver with Apache 2.2.12 as default webserver bound to port 80. For a new project I need to proxy one of Apaches bound domains via port 80 to a Node Express Server 4.7 which runs on the same machine on port 4000.
The Express process served alone is running fine with expected results. Means, when I visit my-domain.com:4000 everything looks good.
Ok, so I set up a virtual host in Apache which should proxy my-domain.com to the Express server on port 4000.
I have tried proxying to localhost:4000 or my-domain.com:4000 but Apache is always rendering the Express response as plain text not as real HTML. This means I see the HTML-String inside my browser instead of the parsed website. The Browser just echos the Express string inside its own html-wrapper nested in a pre-tag when you explore the source code via inspector.
My Apache-Config looks like this:
<VirtualHost *:80>
ServerName my-domain.com
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://localhost:4000/
ProxyPassReverse / http://locahost:4000/
</VirtualHost>
Any help or suggestions would be appreciated. Thx.