how to configure httpd in amazon ec2 instance code example

Example 1: how to configure httpd in amazon ec2 instance

[ec2-user ~]$ sudo service httpd start

Example 2: how to configure httpd in amazon ec2 instance

[ec2-user ~]$ sudo chmod 2775 /var/www
[ec2-user ~]$ find /var/www -type d -exec sudo chmod 2775 {} +

Example 3: how to configure httpd in amazon ec2 instance

[ec2-user ~]$ sudo yum update -y

Example 4: how to configure httpd in amazon ec2 instance

[ec2-user ~]$ sudo yum install -y httpd24 php56 php56-mysqlnd

Example 5: how to configure httpd in amazon ec2 instance

[ec2-user ~]$ sudo usermod -a -G www ec2-user

Example 6: how to configure httpd in amazon ec2 instance

[ec2-user ~]$ sudo chgrp -R www /var/www

Tags:

Php Example