Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4536478
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T14:32:32+00:00 2026-05-21T14:32:32+00:00

I’ve been trying to get to grips with Amazons AWS services for a client.

  • 0

I’ve been trying to get to grips with Amazons AWS services for a client. As is evidenced by the very n00bish question(s) I’m about to ask I’m having a little trouble wrapping my head round some very basic things:

a) I’ve played around with a few instances and managed to get LAMP working just fine, the problem I’m having is that the code I place in /var/www doesn’t seem to be shared across those machines. What do I have to do to achieve this? I was thinking of a shared EBS volume and changing Apaches document root?

b) Furthermore what is the best way to upload code and assets to an EBS/S3 volume? Should I setup an instance to handle FTP to the aforementioned shared volume?

c) Finally I have a basic plan for the setup that I wanted to run by someone that actually knows what they are talking about:

  • DNS pointing to Load Balancer (AWS Elastic Beanstalk)
  • Load Balancer managing multiple AWS EC2 instances.
  • EC2 instances sharing code from a single EBS store.
  • An RDS instance to handle database queries.
  • Cloud Front to serve assets directly to the user.

Thanks,
Rich.

Edit: My Solution for anyone that comes across this on google.

Please note that my setup is not finished yet and the bash scripts I’m providing in this explanation are probably not very good as even though I’m very comfortable with the command line I have no experience of scripting in bash. However, it should at least show you how my setup works in theory.

All AMIs are Ubuntu Maverick i386 from Alestic.

I have two AMI Snapshots:

  • Master
    • Users
      • git – Very limited access runs git-shell so can’t be accessed via SSH but hosts a git repository which can be pushed to or pulled from.
      • ubuntu – Default SSH account, used to administer server and deploy code.
    • Services
      • Simple git repository hosting via ssh.
      • Apache and PHP, databases are hosted on Amazon RDS
  • Slave
    • Services
      • Apache and PHP, databases are hosted on Amazon RDS

Right now (this will change) this is how deploy code to my servers:

  1. Merge changes to master branch on local machine.
  2. Stop all slave instances.
  3. Use Git to push the master branch to the master server.
  4. Login to ubuntu user via SSH on master server and run script which does the following:
    1. Exports (git-archive) code from local repository to folder.
    2. Compresses folder and uploads backup of code to S3 with timestamp attached to the file name.
    3. Replaces code in /var/www/ with folder and gives appropriate permissions.
    4. Removes exported folder from home directory but leaves compressed file intact with containing the latest code.
      5 Start all slave instances. On startup they run a script:
    5. Apache does not start until it’s triggered.
    6. Use scp (Secure copy) to copy latest compressed code from master to /tmp/www
    7. Extract code and replace /var/www/ and give appropriate permissions.
    8. Start Apache.

I would provide code examples but they are very incomplete and I need more time. I also want to get all my assets (css/js/img) being automatically being pushed to s3 so they can be distibutes to clients via CloudFront.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T14:32:33+00:00Added an answer on May 21, 2026 at 2:32 pm

    EBS is like a harddrive you can attach to one instance, basically a 1:1 mapping. S3 is the only shared storage stuff in AWS, otherwise you will need to setup an NFS server or similar.

    What you can do is put all your php files on s3 and then sync them down to a new instance when you start it.

    I would recommend bundling a custom AMI with everything you need installed (apache, php, etc) and setup a cron job to sync php files from s3 to your document root. Your workflow would be, upload files to s3, let server cron sync files.

    The rest of your setup seems pretty standard.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.