sandipjoshi Posted March 10, 2007 Share Posted March 10, 2007 Hi All, wonder if someone can help me please. I have installed apache 2.2.4 and php 5.2.1 I am using windows 2000. I am trying to figure out what url to use so that apache is being used as a web server. I have created a test php file and placed it in the followign location on my machine: C:\Program Files\Apache Group\Apache2\htdocs the document root in the httpd config file is: DocumentRoot "C:\Program Files\Apache Group\Apache2\htdocs" and my directory path is set to: <Directory "C:\Program Files\Apache Group\Apache2\htdocs"> the contents of my test php file is: <html> <head> </head> <body> <?php phpinfo(); ?> </body> </html> if I type: http://localhost into Internet explorer I get the standard "It Works" message. I have been typing: http://localhost/test.php and I get a page cannot be displayed message. Can someone tell me what path I should be tying in the URL to view my pages? Quote Link to comment Share on other sites More sharing options...
R_P Posted March 12, 2007 Share Posted March 12, 2007 What you've typed seems to be a correct configuration. A way you could troubleshoot this is by turning on indexes for that directory and deleting the index file. Apache will then default to showing you a list of files in that directory. If test.php is listed, you will be able to click on it and view. Any errors then given would be an apache security mis-config. If test.php is not listed then it is a documentroot problem. Even if you do not have PHP and Apache appropriately configured to parse the PHP, you should still see the files. Good Luck. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted March 12, 2007 Share Posted March 12, 2007 Yes once Apache is installed, delete the files already in the htdocs folder no need for them now. Once you have done that go to http://localhost and you should now get a list of files/folders that is the document root (htdocs folder). Is you test.php file listed. Also could you tell me the process you did to create the test.php file? If you used Notepad to create it make sure when you went to save it you did not save it as test.php.txt. Notepad will by default add a .txt file extension when you save. What you should do before you click the save button is to make sure the File Type box is set to All Files and not Text Document. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.