Page 1 of 1

Path to Apache reverse proxy

Posted: 2020/07/25 10:02:46
by Centaro
Hello everyone!

I am trying to set up a reverse proxy, but I cannot figure out which file to use. I guess it is somewhere in /etc/httpd …

On /etc/httpd/conf.modules.d/00-proxy.conf, I can see my proxy modules are all turned on.

But what file do I write directives like these onto?
<VirtualHost *:80>
ServerName domain.tld

Keepalive On

ProxyPreserveHost On

ProxyPass "/" http://127.0.0.1:PORT/ retry=0 timeout=5

ProxyPassReverse / http://127.0.0.1:PORT/
</VirtualHost>

Re: Path to Apache reverse proxy

Posted: 2020/07/25 11:43:37
by TrevorH
If you are setting this up for a new domain then create a new file in /etc/httpd/conf.d to define the new site and the parameters you want to use for it.

Re: Path to Apache reverse proxy

Posted: 2020/07/25 12:02:43
by Centaro
It is for a subdomain that I have running on Virtualmin. You say it should be under /etc/httpd/conf.d, but it is not clear to me what the name of the file with the directories should be.

Re: Path to Apache reverse proxy

Posted: 2020/07/25 13:06:59
by TrevorH
It includes all /etc/httpd/conf.d/*.conf files so it has to be named something.conf. Good practice says you should call it a name that tells you what it does.