Search This Blog

Friday, January 4, 2013

EC2: Access to PHP (Apache) in windows server

My Amazon EC2 is running in Windows 2008 Server R2 with IIS. I can access to aspx pages via Elastic IP easily without any problem.

Now i want to have my php application with Apache running in the same server with same IP but port to display in the web

There are mainly 3 important steps

  1. Change httpd.config (configuration file for apache)
    Find line with Listen (or localhost) and change to Listen
    Find line with ServerName  (or localhost)  and change to ServerName
    Save the file and restart apache 
  2. Go to windows firewall and add Port 81 in inbound rules
  3. Add Port 81 to EC2 Security Group. Remember to apply the rule after added.

Done. It's work like charm!

No comments: