I am currently running this wordpress blog in AWS micro instance to see how it goes.
I find some issues.
Atelease once in a week I can not connect to phpmyadmin using master password.
When I check the phpmyadmin folder I see that config.inc.php does not contain password or anything.
Added them back and fixed the issue.
Another issue I find is I can not restart mysql server.
It gives the following error
Stopping mysqld: [ OK ]
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
I have restarted the EC2 instance, then restrated apache and mysql, everything is back.
It looks like the MySQL database crashed because the micro EC2 instance that I was using didn’t have enough processing power to handle the wordpress queries. This is a basic wordpress blog without much plugins, so looks like micro instance is not good enough to run wordpress.
Suppose if you have an EC2 instance where you host 2 sites, say website1 and website2.
Files of website1 are in the folder /var/ww/html/website1
Files of website2 are in the folder /var/ww/html/website2
Say you want to give access to website1 for some developers and to website2 for another set of developers.
So let us have 2 groups, say group1 and group2.
To create groups we need to run
Then we add an user to group1
useradd -G group1 developer1
Now login as developer1 using the sudo and su commands.
sudo su developer1
Now go to developer1’s home directory.
Generate a new public/private key pair for this user using the ssh-keygen command.
ssh-keygen -b 1024 -f developer1 -t dsa
Now create the .ssh/.authorized_keys file with the appropriate ownership and permissions.
chmod 700 .ssh
cat developer1.pub > .ssh/authorized_keys
chmod 600 .ssh/authorized_keys
chown developer1:group1 .ssh
chown developer1:group1 .ssh/authorized_keys
Now download the private key using winscp or any other sftp program. Convert the file to .ppk file (Filezila will automatically convert if you try to add the key)
chown developer1:group1 /var/www/html/website1
Now the developers in group1 has write access only to /var/www/html/website1 but they have read access to all other directories.