Migration from Cloud9 to AWS Cloud9 was not easy. On cloud9, Apache was installed
and configured by default. On AWS, Apache is not properly configured, Once
Apache is installed and configure,
you sometime need to configure the
php.ini file. This page explains how to make the file edition
simple from the Cloud9 editor.
The following has been tested on a freshly AWS EC2 Cloud9 environment with the following versions:
The problem with the default Apache configuration on AWS Cloud9 is that
php.ini file is not at the root of your working directory (
You can configure Apache to change the default location of the
php.ini file, but I prefere
creating a symbolic link and keeping the default apache configuration.
The php.ini file should be located at
sudo updatedb locate php.ini
First, check there is not already a
php.ini file at the root of your working environment.
If a file already exists, delete or backup the file:
mv php.ini backup_php.ini
php.ini file is located, create a symbolic link from the file
to the root of your working environment. In the following, we'll assume
the file is located at
ln -s /etc/php/7.2/apache2/php.ini /home/ubuntu/environment
You can now edit the file, but you can't save it because the editor
does not have suffisant rights. Change the
php.ini file rights :
sudo chmod 666 /etc/php/7.2/apache2/php.ini
You can now edit and save the file at the root of your working environment, it will update you PHP configuration.
After updating your
php.ini file, do not forget to restart your Apache server:
sudo service apache2 restart