Link to home
Start Free TrialLog in
Avatar of sharingsunshine
sharingsunshineFlag for United States of America

asked on

Setting Up Multiple Domains on Amazon Web Services

I have an Amazon instance that I need to set up for multiple domains.  I have the Lamp stack built so now I need to know how and in what order to proceed to copy my existing sites over to the instance.

My instance has 2 16 GB SSD drives.  One is designated for swap.  I have 10 GB set up for root and I have an EBS volume of 100 GB.  But I am not sure on which disk the 10 GB is located.  Is there a way to know on which disk the swap is located?

I am having trouble understanding where the various files are located.  Meaning on which disk are they residing.  

When I run df -h from the command line, I get the following

Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1      9.8G  3.4G  6.4G  35% /
devtmpfs        1.9G   24K  1.9G   1% /dev
tmpfs           1.9G     0  1.9G   0% /dev/shm
/dev/xvdb        16G  2.2G   13G  16% /media/ephemeral0
/dev/xvdd        99G   60M   94G   1% /data
[
When I SFTP into the instance I see /var/www/html but I am not sure what disk it is located on.  Is there a way to determine this?

I have 4 websites that will be on the instance so please step me through how to get their files and mysql DB's over on the instance.  I know I will need to setup virtual hosts but I don't know the sequence this needs to be done and how to get the respective websites in their correct locations.

I think if you talk in generalities I can do the specifics.  For instance, I have a tutorial on virtual hosts like this one http://calebogden.com/multiple-websites-amazon-ec2-linux-virtual-hosts/

Thanks,

Randal
SOLUTION
Avatar of gheist
gheist
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sharingsunshine

ASKER

This is the version Server version: Apache/2.2.26 (Unix)

Thanks for your help.
3 of the 4 websites have their own ssl certs which needs to be considered too.
apache 2.2 -> you must use NameVirtualHost *:80

Which linux? I cannot guess where logs and configs and sites are by default... (leave them in default places, that makes selinux/apparmor happy and gives you system logrotate without extra configuration)
In all other places same pronciple - keep customisations to minimum, so you get no-effort benefit from vendor's upgrades.

for ssl certs all modern browsers support SNI, so NaViHo with port :443, if you want to
support very old browsers with SSL you need an IP address per hostname.
probably you want to run SSL sites via qualys ssl server test before calling whole internet in.
Since its Amazon it doesn't give the normal release details that I can find

Amazon Linux AMI release 2014.03

Linux ip-111-22-33-444 3.10.35-43.137.amzn1.x86_64 #1 SMP Wed Apr 2 09:36:59 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux


If you can tell me a better command to use I will gladly supply what it shows.

If you could explain your comment below more I can proceed.  I am not an expert by any means so some of these terms are going to need more details for me to understand.

******
for ssl certs all modern browsers support SNI, so NaViHo with port :443, if you want to
support very old browsers with SSL you need an IP address per hostname.
probably you want to run SSL sites via qualys ssl server test before calling whole internet in.

Thanks,
AMI is enough RHEL.

Are you sure you are using apache from amazon via yum? it must be 2.2.22+patches...

i.e do you have /etc/httpd/conf.d directory with conf files in it?
Yes, I used yum to update the initial load of linux

Here is what is in conf.d

[amazon_user]$ cd etc/httpd/conf.d
[amazon_user conf.d]$ ls -la
total 44
drwxr-xr-x 2 root root 4096 Apr 24 01:11 .
drwxr-xr-x 4 root root 4096 Apr 24 01:11 ..
-rw-r--r-- 1 root root  347 Dec 10 00:25 notrace.conf
-rw-r--r-- 1 root root 1795 Feb 27 00:49 perl.conf
-rw-r--r-- 1 root root  674 Mar 28 23:58 php.conf
-rw-r--r-- 1 root root  392 Dec 10 00:29 README
-rw-r--r-- 1 root root 9473 Dec 10 00:25 ssl.conf
-rw-r--r-- 1 root root  299 Dec 10 00:25 welcome.conf
-rw-r--r-- 1 root root   43 Feb 18  2013 wsgi.conf

Open in new window

I have the vhost.conf file set up and it passes syntax and apache restarted with no problems so we don't have to focus on that.
SOLUTION
Avatar of Shalom Carmel
Shalom Carmel
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
XP users can use firefox for full encryption... They read in local newspaper and seen in local TV that XP is dead...

Example of "very good" ssl site:
https://www.ssllabs.com/ssltest/analyze.html?d=google.co.uk&s=74.125.239.119&hideResults=on
For "passed syntax" you can use "apachectl configtest" before restart to keep site running...
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I've requested that this question be closed as follows:

Accepted answer: 0 points for sharingsunshine's comment #a40030001
Assisted answer: 480 points for gheist's comment #a40024222
Assisted answer: 20 points for shalomc's comment #a40025435

for the following reason:

no one answered the question I asked and that was most important to me.
No way, you got general and specific instructions
I couldn't in good conscience say what you had given me was the answer so I did the best I could and gave you the same amount of points considering another person helped too.

I wanted the archives to reflect the answer because it has been hard for me to understand how you can specify where something is to be stored.  That was the main question I had that never got addressed.

This is what my response answered

I have 4 websites that will be on the instance so please step me through how to get their files and mysql DB's over on the instance.  I know I will need to setup virtual hosts but I don't know the sequence this needs to be done and how to get the respective websites in their correct locations.

Open in new window

I had no idea this would bother you.  If there is a better way to do this and still identify the correct solution please let me know.