LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-10-2015, 10:42 PM   #1
heypaleblue
LQ Newbie
 
Registered: Dec 2015
Location: TX
Distribution: CentOS 7, Ubuntu Server 14.04
Posts: 3

Rep: Reputation: Disabled
Need Help Creating Forward/ Reverse Proxy in CentOS 7


Hi All

What I'm Trying to AccomplishProxy Reqests for code.mydomain.com from VM1(public Facing) to VM2(Internal) and Back again.
  1. VM1 - CentOS 7 = My Website, Blog, ETC
  2. VM2 - Ubuntu Server 14.04 LTS = ONLY GITLAB

VM1 is my main server and will act as the proxy server (?) however it does not seem sufficiently documented on how to create this kind of proxy. I have been googlying and searching for about 2 hours now and do not know where else to turn. can any of you fine people PLEASE help a modest Linux Enthusiast and user out!? This is Driving me insane!!!

Last edited by heypaleblue; 12-10-2015 at 10:55 PM.
 
Old 12-11-2015, 01:36 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Install Haproxy, read the documentation. Craft your basic haproxy.conf. Read something like http://tecadmin.net/install-and-conf...oxy-on-centos/. Adjust. Test. Then show your commented haproxy.conf here with test results for comments would be the most efficient approach.
 
Old 12-11-2015, 06:58 AM   #3
fmattheus
Member
 
Registered: Nov 2015
Posts: 104

Rep: Reputation: 38
Yep, unSpawn has it right. haproxy, is way easier to do reverse proxy than with nginx or apache.
 
Old 12-11-2015, 10:28 AM   #4
heypaleblue
LQ Newbie
 
Registered: Dec 2015
Location: TX
Distribution: CentOS 7, Ubuntu Server 14.04
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by unSpawn View Post
Install Haproxy, read the documentation. Craft your basic haproxy.conf. Read something like http://tecadmin.net/install-and-conf...oxy-on-centos/. Adjust. Test. Then show your commented haproxy.conf here with test results for comments would be the most efficient approach.
Thank you for your response! I will get on this!
 
Old 12-11-2015, 01:24 PM   #5
heypaleblue
LQ Newbie
 
Registered: Dec 2015
Location: TX
Distribution: CentOS 7, Ubuntu Server 14.04
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by unSpawn View Post
Install Haproxy, read the documentation. Craft your basic haproxy.conf. Read something like http://tecadmin.net/install-and-conf...oxy-on-centos/. Adjust. Test. Then show your commented haproxy.conf here with test results for comments would be the most efficient approach.
The problem here is I'm not looking to server up the same thing on 3 different machines, I'm trying to host 2 different Services on 2 different Machines with only 1 External IP. Reading through the Documentation for version 1.5 which is in my CentOS 7 Repo It does not look like HAProxy Does this. Have I misunderstood? If so can you please point me in the right direction?
 
Old 12-12-2015, 06:24 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by heypaleblue View Post
Have I misunderstood? If so can you please point me in the right direction?
Another data centre, another host, loop back devices, it doesn't really matter where your backends are as long as haproxy has a valid route for requests. haproxy takes over the public IP and the backends (services you want to expose) then are either ports on the same public IP (bad if not ACL'ed properly because then you can access them w/o needing haproxy in the first place) or ports in say a private LAN range.
 
Old 12-15-2015, 11:53 AM   #7
pablob
Member
 
Registered: Apr 2003
Location: Madrid
Distribution: RHEL, Kubuntu, Solaris, TRU64
Posts: 382

Rep: Reputation: 31
You mean something like this ?

http://code.mydomain.com/gitlab should proxy to http://vm2/gitlabinside and back.


<IfModule mod_proxy.c>
ProxyRequests off
ProxyPass /gitlab http://vm2/gitlabinside
ProxyPassReverse /gitlab http://vm2/gitlabinside
</IfModule>

Just take care vm1 knows how to resolve vm2 IP address.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Squid Reverse Proxy Help on Centos mirjee4u Linux - Server 0 05-04-2014 12:44 PM
Nginx Reverse proxy on a internal apache reverse server ITiger Linux - Software 0 04-25-2014 07:44 AM
[SOLVED] reverse proxy not starting on centos leading to (98)Address already in use... arnaud Linux - Networking 2 10-23-2013 10:56 AM
Forward and Reverse Proxy Server with URL redirection itmark Linux - Newbie 2 09-05-2013 05:35 AM
CentOS 5 - Need a reverse proxy TomBodet Linux - Server 10 01-26-2012 03:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration