0

I have a CentOS 6.7 server with Webmin and Virtualmin installed, hosting 15+ websites.

All works as it should.

However, if a request comes in without a domain name (directly to http://1.1.1.1 for example) I want to send that to another server on my local network say 192.168.1.10

I have done this before and dont remember it being complicated, but now I have spent many hours and frustration trying to make this work

I do not want to misconfigure Apache and end up letting hackers laugh at me and proxy thru my server, so I want to make sure it is configured correctly

I havent been able to make it work yet.

Here is my config:

<IfModule mod_proxy.c>
ProxyRequests On
<Proxy *>
    Order allow,deny
    Allow from all
</Proxy>

#
# Enable/disable the handling of HTTP/1.1 "Via:" headers.
# ("Full" adds the server version; "Block" removes all outgoing Via: headers)
# Set to one of: Off | On | Full | Block
#
ProxyVia On

#
# To enable a cache of proxied content, uncomment the following lines.
# See http://httpd.apache.org/docs/2.2/mod/mod_cache.html for more details.
#
#<IfModule mod_disk_cache.c>
#   CacheEnable disk /
#   CacheRoot "/var/cache/mod_proxy"
#</IfModule>
#

</IfModule>


<VirtualHost *:*>
    ProxyPreserveHost On

    ProxyPass / http://192.168.1.1:80/
    ProxyPassReverse / http://192.168.1.1:80/


</VirtualHost>
jlemming
  • 57
  • 1
  • 8

1 Answers1

3

I GOT IT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

It can be fixed within Webmin/Virtualmin itself.

Just go to Virtualmin > (your default website) > Server Config > Edit Proxy Website

then put in your proxy address and enable it

like http://192.168.1.1:80

it has to be in that form, for example 192.168.1.1 WILL NOT WORK :)

jlemming
  • 57
  • 1
  • 8