{"id":65,"date":"2010-09-21T17:37:07","date_gmt":"2010-09-21T22:37:07","guid":{"rendered":"http:\/\/soljerome.com\/blog\/?p=65"},"modified":"2010-09-21T17:41:46","modified_gmt":"2010-09-21T22:41:46","slug":"apache-reverse-proxy-using-mod_proxy","status":"publish","type":"post","link":"https:\/\/www.soljerome.com\/blog\/2010\/09\/21\/apache-reverse-proxy-using-mod_proxy\/","title":{"rendered":"Apache reverse proxy using mod_proxy"},"content":{"rendered":"<p>I recently set up this blog on a virtual machine which is running on my home computer. Since soljerome.com was already running elsewhere, I decided to serve up the content using the existing apache instance at soljerome.com by setting up apache using a reverse proxy.<\/p>\n<p>This particular setup is on Ubuntu 8.04 as that is the distribution running on my web server. My web server is able to view the virtual machine using an internal IP address of 10.10.10.34. Here is the <code>\/etc\/hosts<\/code> entry<\/p>\n<p><code>10.10.10.34     www.solnet www blog.solnet blog<\/code><\/p>\n<p>So, I am able to view the blog from the web server by browsing to http:\/\/blog.solnet. Therefore, I needed to tell Apache was to take a URL like http:\/\/soljerome.com\/blog, internally request http:\/\/blog.solnet, and give the result back to the viewer.<\/p>\n<p>The first thing I needed to do was install the Apache mod_proxy module<\/p>\n<p><code>aptitude install libapache2-mod-proxy-html<br \/>\n<\/code><\/p>\n<p>Then I enabled the proxy module by running<\/p>\n<p><code>a2enmod proxy_html<br \/>\n<\/code><\/p>\n<p>After the module was enabled, I added the following lines to <code>\/etc\/apache2\/sites-available\/default<\/code><\/p>\n<pre>    ProxyRequests off\u00a0\u00a0\u00a0 \r\n\r\n\u00a0\u00a0\u00a0 &lt;Proxy *&gt;\r\n        AddDefaultCharset off\r\n        Order deny,allow\r\n        Allow from all\r\n\u00a0\u00a0\u00a0 &lt;\/Proxy&gt;\r\n\u00a0 \u00a0 ProxyPass \/blog http:\/\/blog.solnet\r\n    ProxyVia off<\/pre>\n<p>Once I restarted Apache, I was able to browse to <a href=\"http:\/\/soljerome.com\/blog\">http:\/\/soljerome.com\/blog<\/a> successfully. There are still a few things that I have yet to get working properly (although I think most are due to bugs in WordPress). Some of the wp-admin links work but redirect to the internal address which forces me to have to click the back button on my browser (annoying). Also, trying to setup the admin interface to use SSL has proved to be a problem.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently set up this blog on a virtual machine which is running on my home computer. Since soljerome.com was already running elsewhere, I decided to serve up the content using the existing apache instance at soljerome.com by setting up apache using a reverse proxy. This particular setup is on Ubuntu 8.04 as that is <a href='https:\/\/www.soljerome.com\/blog\/2010\/09\/21\/apache-reverse-proxy-using-mod_proxy\/' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[9,3],"tags":[],"_links":{"self":[{"href":"https:\/\/www.soljerome.com\/blog\/wp-json\/wp\/v2\/posts\/65"}],"collection":[{"href":"https:\/\/www.soljerome.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.soljerome.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.soljerome.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.soljerome.com\/blog\/wp-json\/wp\/v2\/comments?post=65"}],"version-history":[{"count":19,"href":"https:\/\/www.soljerome.com\/blog\/wp-json\/wp\/v2\/posts\/65\/revisions"}],"predecessor-version":[{"id":90,"href":"https:\/\/www.soljerome.com\/blog\/wp-json\/wp\/v2\/posts\/65\/revisions\/90"}],"wp:attachment":[{"href":"https:\/\/www.soljerome.com\/blog\/wp-json\/wp\/v2\/media?parent=65"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.soljerome.com\/blog\/wp-json\/wp\/v2\/categories?post=65"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.soljerome.com\/blog\/wp-json\/wp\/v2\/tags?post=65"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}