Need help setting up: Apache Reverse Proxy

前端 未结 1 603
情歌与酒
情歌与酒 2020-12-17 03:41

I have some trouble setting my virtualhosts file up the right way. I\'d like to send vistors to the right server by using reverse proxy. My current setup gives me an interna

相关标签:
1条回答
  • 2020-12-17 04:09

    Got it working! used the following setup:

    <VirtualHost *:80>
        ServerName sub.domain.com
        ServerAdmin me@domain.com
    
        ProxyRequests Off
    
        ProxyPreserveHost On
    
        <Proxy *>
            Order deny,allow
            Allow from all
        </Proxy>
    
        ProxyPass / http://192.168.1.11/websvn/
        ProxyPassReverse / http://192.168.1.11/websvn/
    </VirtualHost>
    

    the /websvn/ part was neccesary to include the css and other files properly

    In another loaded .conf file:

     LoadModule proxy_connect_module /usr/lib/apache2/modules/mod_proxy_connect.so
     LoadModule proxy_ftp_module /usr/lib/apache2/modules/mod_proxy_ftp.so
     LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
    

    Which is used to inlcude the neccesary modules

    0 讨论(0)
提交回复
热议问题