Results 1 to 10 of 12

Thread: ProxyPassReverse not working...

Hybrid View

  1. #1
    Join Date
    Jul 2009
    Location
    Beautiful N. West
    Beans
    23
    Distro
    Ubuntu 9.10 Karmic Koala

    ProxyPassReverse / Mod Proxy_html not working...

    Hello all, I'm a complete noob to Ubuntu and Apache.. and am trying to get ProxyPassReverse to work but with no luck. I've Googled but still can't seem to get it to work. This is what I have gotten so far...

    1. I've got Ubuntu 9.10 running in a Virtual Machine
    2. Installed Apache 2.2
    3. Enabled Mod Proxy (sudo a2enmod proxy)
    4. Restarted Apache (sudo init.d/etc/apache2 restart)
    I get this comment:

    Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

    5. Insert the following at the very bottom (but before </VirtualHost> tag) of my default file (sudo gedit /etc/apache2/sites-available/default)

    ProxyRequests Off
    <Proxy *>
    Order deny,allow
    Allow from all
    </Proxy>
    ProxyPass /test http://www.google.com
    ProxyPassReverse /test http://www.google.com

    6. I then save the file and go to http://localhost/test
    7. I get the following message:

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    More information about this error may be available in the server error log.

    Any help is much appreciated!
    Last edited by shirubia; December 2nd, 2009 at 11:57 PM.

  2. #2
    Join Date
    Dec 2006
    Location
    Chicago
    Beans
    3,839

    Re: ProxyPassReverse not working...

    First of all, what exactly are you trying to accomplish? Why did you use "/mail" for ProxyPassReverse? Also, did you try
    Code:
    sudo a2enmod proxy_http
    sudo /etc/init.d/apache2 restart
    You don't want to insert anything at the very bottom of your site configuration. It should be within the "VirtualHost" tag, otherwise it will be a global setting and apply to all hosts.

  3. #3
    Join Date
    Jul 2009
    Location
    Beautiful N. West
    Beans
    23
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: ProxyPassReverse not working...

    Quote Originally Posted by cdenley View Post
    First of all, what exactly are you trying to accomplish? Why did you use "/mail" for ProxyPassReverse? Also, did you try
    Code:
    sudo a2enmod proxy_http
    sudo /etc/init.d/apache2 restart
    You don't want to insert anything at the very bottom of your site configuration. It should be within the "VirtualHost" tag, otherwise it will be a global setting and apply to all hosts.
    I have a website (site a) hosted on another server (and another geographic location). I'm looking to host a section of that website (site b) on my home server, but I want this section to have the same url as the original site. After doing some googling i found this ProxyPassReverse. But I can't seem to get it to work.

    I'm sorry, that "/mail" is actually suppose to be "/test", I changed the original post. I also I meant to say I put the ProxyPassReverse stuff at the bottom, BUT before the </VirtualHost> tag.

    I JUST TRIED a2enmod proxy_http AND IT WORKS~! wow, thank you so much man.

    I've read on a couple forums and they all say to do a2enmod proxy_html, and not http and every time I tried html I would get a "module does not exist!" msg... such a simple mistake but you cleared it all up.

    It works now, but images are not rendering correctly, links are also broken... any advice?
    Last edited by shirubia; November 9th, 2009 at 06:57 PM.

  4. #4
    Join Date
    Jul 2009
    Location
    Beautiful N. West
    Beans
    23
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: ProxyPassReverse not working...

    I've installed libxml2 and mod proxy_html via Synaptic Package Manager. I've also enabled the proxy_html (a2enmod proxy_html) but have no idea where to insert ProxyHTMLURLMap... Any advice?

  5. #5
    Join Date
    Dec 2006
    Location
    Chicago
    Beans
    3,839

    Re: ProxyPassReverse not working...

    Quote Originally Posted by shirubia View Post
    I've installed libxml2 and mod proxy_html via Synaptic Package Manager. I've also enabled the proxy_html (a2enmod proxy_html) but have no idea where to insert ProxyHTMLURLMap... Any advice?
    It can be used anywhere, so it all depends what kind of scope you want it to have. You probably want to use it for a single site, so use it within the site's "VirtualHost" tag.

  6. #6
    Join Date
    Sep 2009
    Location
    In a cold, dark place
    Beans
    186
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: ProxyPassReverse not working...

    I found this from the users@apache.org mailing list; maybe it might help?

    The question was:-

    > We have a corporate site at: http://www.example.com We are
    > implementing a new webshop and our Marketing dep. decided om:
    > http://www.example.com/order
    >
    > Due to the nature of the requests and for performance, I would like to host the web shop on two different webservers.
    > I thought of mod_proxy to create a reverse proxy on the webservers of example.com.
    >
    > Are there any other ways to achieve this?
    > They do not want to expose a different name then www.example.com/order

    and the reply was:-


    Code:
    <VirtualHost 0.0.0.0:80>
        ServerName    "www.example.com"
        DocumentRoot "/var/www/html"
    
        ProxyPass        /order/ http://backend-order-server/order/
        ProxyPassReverse /order/ http://backend-order-server/order/
    
        etc...
    
    </VirtualHost>
    It's not just about "Why should I want Linux?". It's also about "Why should Linux want me?"

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •