Welcome Guest, Not a member yet? Register   Sign In
Deploying Codeigniter to AWS EBS
#9

I can't tell from the thread. In your first post you said AWS EBS but then a later post you said windows laptop. If it's AWS are you using an EC2 instance with EBS device or Elastic Beanstalk? I haven't used the Beanstalk yet so I can't help you there. Since I can only guess, here's some generic info on AWS hosting.

If you are using EBS and not Beanstalk you need to issue the commands to set the owner and permissions of the web files. You said you were using AWS. I am going to assume Ubuntu/Apache just because its the most common and I'm more familiar with it. Not a dis against the other distros but the details will vary by linux dist. These commands will work with Ubuntu and Apache2. If you're using Centos/Redhat/Suse or any of the other distros the default users and locations will differ.

Your default userid will not have authority to change owners and permissions but *nix gives you a special permissions command called sudo.

sudo chmod -R 0755 /var/www/html
sudo chown -R root:www-data /var/www/html

(var/www/html) is the default apache2 installation location. If you are indeed using EBS, this will need to be the filesystem mount point for the EBS device.

First in the /etc/apache2/sites-available/000-default.conf contains an entry for DocumentRoot. By default it is set to /var/www/html. If you want to use EBS you'll want to use the AWS control panel to create an EBS volume separate from your running instance, allocate it to your EC2 instance and finally mount the volume somewhere on the filesystem.

sudo mount /dev/sd0 /s3

mountcopy your files to a folder under /s3 like /s3/wwwroot

Also need to change the /etc/fstab file to auto mount the device after a reboot

In my case, EBS used to be call Simple Storage Solution or S3. My ebs volume is mounted as /S3. You can created a folder under /S3/wwwroot and change the DocumentRoot setting to point to the new folder.

On Ubuntu the default installation of Apache runs as user www-data. The system user is ubuntu. You have to change the owner and file permissions.
Reply


Messages In This Thread
RE: Deploying Codeigniter to AWS EBS - by ciadmin - 05-13-2017, 10:01 PM
RE: Deploying Codeigniter to AWS EBS - by eflyerman - 05-14-2017, 01:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB