Lineman Posted April 4, 2008 Share Posted April 4, 2008 I have written a simple html file and called it greetings and then saved it as greetings.php. I then moved greetings.php to the apache2-default folder and have tried to view it by using: http://127.0.0.1/greetings.php but all i keep getting is Not Found. The requested URL/greetings.php was not found on this server. Could someone explain what i might i am doing wrong please. Just thought i'd mention that i am running Ubuntu "Gutsy Gibbon 7.10". Quote Link to comment Share on other sites More sharing options...
gm04030276 Posted April 4, 2008 Share Posted April 4, 2008 ah don't put it in the apache-default folder! the default root on (k)ubuntu is /var/www/ so you need to put your file there.../var/www/greetings.php currently you would need to put http://localhost/apache-default/greetings.php Quote Link to comment Share on other sites More sharing options...
gm04030276 Posted April 4, 2008 Share Posted April 4, 2008 also if you just go to http://localhost/ and don't have an index.(php|html|etc) page there, then it will just show you the folders in that directory, you should see the apache-default folder there and when you more your greetings.php file, it should appear with it. Quote Link to comment Share on other sites More sharing options...
Lineman Posted April 4, 2008 Author Share Posted April 4, 2008 When i just typed: /var/www/apache2-default/greetings.php i did manage to view it but only it's source code? Quote Link to comment Share on other sites More sharing options...
gm04030276 Posted April 4, 2008 Share Posted April 4, 2008 yea, thats because your just looking at the file on your computer, not getting the server to parse it and do its thing with it, you need to go to http://localhost/apache2-default/greetings.php to view it from the server! 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.