logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: How to config Apache running on VMs
Author
satimis



Joined: 28 Mar 2015
Posts: 7

PostPosted: Sat 28 Mar '15 9:26    Post subject: How to config Apache running on VMs Reply with quote

Hi all,

I have installed several websites, each running on its own VMs with following details:

1. They are on name-base and can be evoked on VM browser with /localhose/subdomain(xyz)
(e.g. xyz.domain.com - only with xyz)
2. Each VM is alloted with an internal IP
3. They are running on WordPress
4. Domains are registerd and hosted with Godaddy
5. I'm subscribing 100M/100M up/down Broadband with only ONE fixed/static IP
6. OS of Host and VMs - Ubuntu 14.04

How to configure the servers so that they can be browsed on Internet? I have been googling a while and found many suggestions. Following is an example;

Creating Name and IP Based Virtual hosts in debian
http://www.debianhelp.co.uk/virtualhosts.htm

Please advise which will be the simple way to configure the websites? Pointers would be appreciated.

Thanks in advance.

Regards
satimis
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Mon 30 Mar '15 10:50    Post subject: Reply with quote

if you want to keep the website in different VM then you can install apache as a reverse proxy on the Host OS with name based vhosts.
Back to top
satimis



Joined: 28 Mar 2015
Posts: 7

PostPosted: Mon 30 Mar '15 11:20    Post subject: Reply with quote

Hi,

Thanks.

Whether following link will be appropriate?

Name-based hosts on more than one IP address
http://httpd.apache.org/docs/2.4/vhosts/examples.html

The websites are configured name-based on VM. They can be browsed running:
/localhost/xyz

xyz.domain.com

Each VM has its own internal IP.

Pointer would be appreciated. Thanks

Regards
satimis
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Mon 30 Mar '15 15:28    Post subject: Reply with quote

example vhosts

Code:

<VirtualHost *:80>
    ServerName x.domain.com
    DocumentRoot "/var/www"
    <Directory "/var/www">
        Options Indexes Includes FollowSymLinks
        AllowOverride All
        Order Allow,Deny
        Allow from all
        Deny from none
    </Directory>
    <Location />
        ProxyPass http://192.168.100.1/
        ProxyPassReverse http://192.168.100.1/
    </Location>
</virtualhost>

<VirtualHost *:80>
    ServerName y.domain.com
    DocumentRoot "/var/www"
    <Directory "/var/www">
        Options Indexes Includes FollowSymLinks
        AllowOverride All
        Order Allow,Deny
        Allow from all
        Deny from none
    </Directory>
    <Location />
        ProxyPass http://192.168.100.2/
        ProxyPassReverse http://192.168.100.2/
    </Location>
</virtualhost>
Back to top


Reply to topic   Topic: How to config Apache running on VMs View previous topic :: View next topic
Post new topic   Forum Index -> Apache