LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   reverse proxy config help (https://www.linuxquestions.org/questions/linux-newbie-8/reverse-proxy-config-help-759980/)

redsnapperke 10-06-2009 02:03 AM

reverse proxy config help
 
Hello,

I need to setup a reverse proxy between internet and two internal websites.

The problem is that I have only one public ip wich points on the internet to several subdomains:

website1.domain.com
mail.domain.com

On the firewall I have created two nat rules
one Http who goes to 192.168.50.20 (website1.domain.com)

One https who goes to 192.168.3.3 (mail.domain.com)

Now the problem is when you use http://mail.domain.com you arrive also website1.domain.com and vica versa, which is normal.

I have setup a reverse proxy (version 3.0) who should redirect the requests to the correct internal site.

so if anyone should use http://mail.domain.com or https://mail.domain.com he should be redirected to 192.168.3.3

and http://website1.domain.com https://website1.domain.com should arrive to 192.168.50.20


For the moment I have got only the https://mail.domin.com working

I have this in my squid.conf


http_port 80 accel vhost

cache_peer website1.domain.com parent 80 0 no-query originserver default
acl dstserver1 dstdomain website1.domain.com
http_access allow all
http_access allow dstserver1
cache_peer_access website1.domain.com allow dstserver1
cache_peer_access website1.domain.com deny all



https_port 443 accel vhost cert=/usr/clientname/CertAuth/testcert.cert key=/usr/clientname/CertAuth/testkey.pem version=1


cache_peer mail.domain.com parent 443 0 no-query originserver ssl sslversion=1 sslflags=DONT_VERIFY_PEER name=mail.domain.com
acl dstserver dstdomain mail.domain.com
http_access allow all
http_access allow dstserver
cache_peer_access mail.domain.com allow dstserver
cache_peer_access mail.domain.com deny all

Anyone an idea how to set this up?

Thank you in advance

Tux-Slack 10-06-2009 03:36 AM

Sorry, I don't know how to help you with squid, but why don't you use Apaches built-in mod_proxy and configure the reverse proxy there? It's much easier to do it there.

If you're interested, lemme know and I'll help you configure it there.


All times are GMT -5. The time now is 03:32 AM.