Part 5: Rhodecode through Apache reverse proxy


Fight on, fight on, dear old Muncie. Fight on, hoist the gold and blue. You’ll be tattered, torn, and hurtin’, once the Munce is done with you. Goooo Eagles!

Not really “on,” Not really “in.” Let’s work on serving Rhodecode’s pages through a reverse proxy in Apache.

I know you’ve forgotten, but Rhodecode is bound to localhost:5000; meaning, it will not service remote connections.

netstat -apn | grep :5000

With reference to Apache subdirectory

Configure the reverse proxy

vim /etc/httpd/conf/httpd.conf

Add the following:

<Location /rhodecode>
ProxyPass http://127.0.0.1:5000/rhodecode
ProxyPassReverse http://127.0.0.1:5000/rhodecode
SetEnvIf X-Url-Scheme https HTTPS=1
</Location>

Configure Paste

vim /var/www/rhodecode-venv/production.ini
#under the [app:main] section add the following:
#  filter-with = proxy-prefix
#
#append the following to the end of the file:
#  [filter:proxy-prefix]
#  use = egg:PasteDeploy#prefix
#  prefix = /rhodecode

Allow mod_proxy to connect to a machine via the network

setsebool -P httpd_can_network_connect 1 #these selinux booleans take a lot of time to get changed.  I'm not sure if you copied this entire line, but if you did and you're still reading this, then you should have another 30 seconds to wait.

Restart paste-serve-rhodecode and ApacheĀ 

service paste-serve-rhodecode restart
service httpd restart
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 42 other followers

%d bloggers like this: