Tuesday, March 10, 2015

Setup static web site on AWS EC2

Allow HTTP 80 port redirection from public IP to your private server, by default only 22 port is setup:

sudo yum install mc

desable SElinux

restart SERVER:

vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
service iptables restart


How to install Apache Server on CentOS, RedHat, Linux

Install Apache HTTP Server
yum install httpd
Note: This is typically installed with CentOS by default

How to configure Apache Server on CentOS, RedHat, Linux

Set the apache service to start on boot
chkconfig --levels 235 httpd on
Enable name-based virtual hosting on port 80
Open the httpd configuration file located at /etc/httpd/conf/httpd.conf

ErrorLog /www/logs/error_log
CustomLog /www/logs/access_log combined
DocumentRoot "/www"

Save the file
Restart the Apache HTTP Server daemon
service httpd restart

 In Browser : should show apapche welcome page

To make Authentication for one user by password:

No comments:

Post a Comment