0

I have enabled reverse proxy on Apache Web server. Included below parameters in alm.conf file

ProxyPass /almbin http://172.1x.xxx.xx:80/almbin/
ProxyPassReverse /almbin http://172.1x.xxx.xx:80/almbin/

in httpd.conf:

Include conf.d/alm.conf

Made entry in /etc/hosts file as below:

alm.test.com     172.1x.xxx.xx:80   almTest

But I am not able to redirect in on Internet. IP address i.e. 172.1x.xxx.xx:80/almbin/ works but when tried with host name alm.test.com it gives error as DNS cannot be resolved.

  • Perhaps you're not using /etc/hosts. What does /etc/nsswitch.conf contain on the "hosts:" line? "files" should be first. And the syntax of your /etc/hosts is wrong. Should be 172.1x.xxx.xx almTest alm.test.com. IP address first, and no port number!! – Gerard H. Pille Jan 17 '18 at 8:54
0
  1. you don't own test.com (so stop using it, use .local or something). Nobody on the internet is ever going to try resolving test.com addresses by querying your server.

  2. you're not even running a DNS server, so even if you had that domain and it was delegated to your server, there's nothing running to answer queries about it. An /etc/hosts file is seen only by the host it is installed on.

  3. 172.1x.x.x - i'll guess that's in the range 172.16.0.0 to 172.31.255.255. That's an RFC 1918 private IP address, not routed on the internet - used for internal networks only.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.