0

I tried many things since yesterday with no good result. Here is the situation I have an internal server listening on port 4000 and a wordpress directory located in /var/www/html/wordpress.

I use

ProxyPass / http://locahost:4000/

to handle the first server but I can't figure out how to serve my wordpress so that

http://example.ext/wordpress

go the wordpress directory and not the internal server listening on port 4000.

A hint or anything more than that would be highly appreciated,

thx a lot for your answers

Jenny D
  • 27,780
  • 21
  • 75
  • 114
  • You very also likely want to have a ProxyPassReverse line (same args) in addition to the ProxyPass line. This is in addition to ezra-s's answer. – Cameron Kerr Aug 04 '16 at 08:41

1 Answers1

1

Your actual ProxyPass directive is telling Apache to proxy everything to that backend, but the problem is easy to solve.

Before your actual ProxyPass directive add this one:

ProxyPass /wordpress !

This one will effectively tell Apache to not proxy /wordpress and whatever comes after it, as in /wordpress/something, etc..

Just keep in mind that most specific paths should be defined before the more global paths, that's why I say you should add the directive I told you "before" the one you already have.

In case of any doubts here is the reference page: ProxyPass Reference URL

Daniel Ferradal
  • 2,415
  • 1
  • 8
  • 13