LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-20-2015, 05:20 AM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56
About HTTP port 80


Hi all,

Host - Ubuntu 14.04
VMs - Ubuntu 14.04 LAMP and WordPress

There are several websites, each running on VMs. I have only one Static IP. If on router forwarding port 80 to 192.168.0.xx1 then other websites on other VMs couldn't be accessed on Internet. I have tried port 8080 or 82 but it didn't work.

Please advise is there any solution? Thanks

Regards
satimis
 
Old 05-20-2015, 10:24 PM   #2
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,905

Rep: Reputation: 1057Reputation: 1057Reputation: 1057Reputation: 1057Reputation: 1057Reputation: 1057Reputation: 1057Reputation: 1057
You need to configure virtual hosts for each instance of apache you want to use to serve content.

https://httpd.apache.org/docs/2.2/vhosts/
 
Old 05-20-2015, 10:40 PM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by mralk3 View Post
You need to configure virtual hosts for each instance of apache you want to use to serve content.

https://httpd.apache.org/docs/2.2/vhosts/
Hi,

Thanks for your advice.

Because I have only one Static IP I need to install all websites on ONE VM and configure them on "Name-based Virtual Hosts". I couldn't install the websites and run them on several VMs. In such a case it would be better installing all websites on the host HDD without running virtualization.

Regards
satimis
 
Old 05-21-2015, 01:58 AM   #4
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,496

Rep: Reputation: 1559Reputation: 1559Reputation: 1559Reputation: 1559Reputation: 1559Reputation: 1559Reputation: 1559Reputation: 1559Reputation: 1559Reputation: 1559Reputation: 1559
Having websites on separate VMs with a single "public facing" IP isn't difficult but does take a bit of effort.

Make use of HAPROXY.

Set up a VM running haproxy listening on port 80 and direct ALL your incoming web traffic to that VM.

Within haproxy define multiple "frontend"s and use the hdr_dom(host) directives to match the domain name of the incoming request and then point it to the IP address of the appropriate "backend" VM.
 
Old 05-21-2015, 02:26 AM   #5
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by TenTenths View Post
Having websites on separate VMs with a single "public facing" IP isn't difficult but does take a bit of effort.

Make use of HAPROXY.

Set up a VM running haproxy listening on port 80 and direct ALL your incoming web traffic to that VM.

Within haproxy define multiple "frontend"s and use the hdr_dom(host) directives to match the domain name of the incoming request and then point it to the IP address of the appropriate "backend" VM.
Hi,

Thanks for your advice.

I found following links, hoping that they are relevant for my use.
How to configure HTTP load balancer with HAProxy on Linux
http://xmodulo.com/haproxy-http-load...cer-linux.html

Installing and Configuring HAProxy on Ubuntu 14.04
https://www.vultr.com/docs/installin...n-ubuntu-14-04

How to set up loadbalancing on Ubuntu 14.04 with HAProxy and NGINX
https://www.youtube.com/watch?v=dRU7rqqX7ho

I'm running Ubuntu 14.04

Thanks

Regards
satimis
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
HTTP to HTTPS on the same port vzxen Linux - Server 15 03-25-2011 12:14 AM
http port forwarding sanjibgupta Linux - Networking 2 04-27-2007 01:02 PM
turn off http port 80, keep https port 443 lothario Linux - Networking 6 02-11-2005 04:06 AM
HTTP port and Proxy port problem AZIMBD03 Linux - Networking 3 04-15-2004 09:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:52 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