Category Archives: AWS

Create Virtual host on EC2 (ubuntu)

Steps

  1. sudo mkdir -p /var/www/rex.com/
  2. sudo chown -R ubuntu:www-data /var/www/rex.com/
  3. sudo chmod -R 755 /var/www/
  4. cd /etc/apache2/sites-available/
    sudo cp 000-default.conf rex.com.conf
    sudo nano rex.com.conf
  5. sudo a2ensite rex.com.conf
  6. sudo service apache2 restart

Reference:

  1. http://diary.taskinghouse.com/posts/664386
  2. https://nouveauframework.org/blog/vhosts-running-multiple-sites-on-a-single-aws-ec2-instance/

Install and Enable mbstring module on AWS EC2

Install mbstring:

Enable mbstring module

Restart apache:

Reference:

Edit php.ini

 

Edit config file of Apache on Amazon Linux

Find the path of httpd.conf

ps -ef | grep apache
/usr/sbin/apache2 -V
Reference: http://www.commanigy.com/blog/2011/06/08/finding-apache-configuration-file-httpd-conf-location

Edit httpd.conf

sudo nano /etc/httpd/conf/httpd.conf
Reference:

Restart Apache

sudo service httpd restart