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
Comments (0)
Leave a comment