Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Possible Duplicate:
Making webpages on the server accessible

I have just set up a LAMP EC2 instance using rightscale when I got to the link:

"http://ec2-xxx.compute-1.amazonaws.com/"

I get the standard apache welcome page. Now on my server I have the directory '/var/www/html/' where I can put my 'publicly' viewable web-pages. I have added a directory in here with some php script which are now at:

"/var/www/html/newdir/somefilename.php"

When I go to:

"http://ec2-xxx.compute-1.amazonaws.com/newdir/somefilename.php"

The script doesnt run (php is working) - i.e. I get 'Not found' - i.e. cant even find the page. I have set permissions to the directory and file to 777 (using chmod).

Can anyone please tell me what I am not doing? I want to be able to run the php from a web browser

share|improve this question

migrated from stackoverflow.com Jul 15 '10 at 13:29

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Zoredache, Scott Pack, Dan, Ladadadada, Lucas Kauffman Aug 1 '12 at 20:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

add comment

1 Answer 1

up vote 0 down vote accepted

Check you httpd.conf file. It seems to be a configuration issue with DocumentRoot.

IIRC, Apache on debian is set to have a DocumentRoot configured like this

DocumentRoot /var/www

If so, you can view your script via your browser with following URL:

http://ec2-xxx.compute-1.amazonaws.com/html/newdir/somefilename.php

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.