[ec2-beta] Virtual Hosts with Apache2

Michael Greenly mgreenly at gmail.com
Mon Mar 9 17:24:26 GMT 2009


There's nothing unique about EC2 in respect to any of this.

If it's falling through the default location it means it's not finding a
match.

You will want to make sure that each domain name you want to use with this
instance has record pointing to the instances IP address.

You can do an "nslookup mydomain.com" to check this

You will want to make sure that you have a virtualhost configuration that
includes a servername or serveralias directive.

<virtualhost *:80>
  servername www.example.com
  serveralias  example.com

  ....

</virtualhost>

<virtualhost *:80>
  servername www.someplace.com
  serveralias  www.someplace.net

 ....

</virtual>

Also make sure that your configuration modifications are enabled.  Each
configuration should be in it's own file inside the
/etc/apache2/sites-available directory.  Then you'd use a2ensite to enable
it.  If you're not familiar with this I'd look around the web for some
tutorials about configuring Apache in Ubuntu or Debian.

Hope that helps some.

On Mon, Mar 9, 2009 at 9:57 AM, Micah Walter <micahpix at mac.com> wrote:

> Hi,
> I am trying to set up an instance to serve about 5 or 6 websites. I
> would like to do this via Apache2's Virtual Hosts setup where I can
> have one IP address and many sites.
>
> So far I haven't been able to get it to work. I use an elastic IP with
> the instance and put that in the godaddy domain setup. It seems to
> always want to point to the default location and not the virtual host
> I have created. So I am guessing that I either have my apache config
> files setup incorrectly, or that perhaps there is some intricacy about
> doing this on EC2 that I'm not aware of...
>
> Has anyone else been successful setting this up?
>
> best
> micah
>
> --
> Ec2-beta mailing list
> Ec2-beta at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ec2-beta
>



-- 
Michael Greenly
http://blog.michaelgreenly.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/mailman/private/ec2/attachments/20090309/63fd3ab4/attachment-0002.htm 


More information about the Ec2-beta mailing list