Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (19.1k points)

I am new to this sort of course.

I am trying to configure PHP and Apache on a new Amazon EC2 AMI. This is a very lightweight server so the Micro instance fits the bill.

I just need Apache PHP

I ran

 sudo yum install apache2

 sudo yum install php

I copied info.php to /var/www/html

info.php only contains

<? phpinfo(); ?>

when I browse to http://www.example.com/info.php Apache serves info.php but it does not render it. I look like apache is not configured to handle php files. What step or steps am I missing?

1 Answer

0 votes
by (44.4k points)

Instead of <? phpinfo(); ?>, try this:

<?php phpinfo(); ?>`

If this is not doing the trick, then try restarting your Apache service with:

sudo service httpd restart

Related questions

0 votes
1 answer

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
1 answer
asked Jul 8, 2019 in AWS by yuvraj (19.1k points)
0 votes
1 answer
0 votes
1 answer

Browse Categories

...