Opening .php files

Forum for you who has PHP installation issues

Moderators: macek, egami, gesf

beedyb220
New php-forum User
New php-forum User
Posts: 2
Joined: Wed Sep 17, 2003 9:04 pm

Opening .php files

Postby beedyb220 » Wed Sep 17, 2003 9:27 pm

I have installed Apache 2 and PHP 4.3.3. The question I have is that when I open http://localhost in my browser.. I get an Apache page that says :

If you can see this, it means that the installation of the Apache web server software on this system was successful. You may now add content to this directory and replace this page.

Seeing this instead of the website you expected?
This page is here because the site administrator has changed the configuration of this web server. Please contact the person responsible for maintaining this server with questions. The Apache Software Foundation, which wrote the web server software this site administrator is using, has nothing to do with maintaining this site and cannot help resolve configuration issues.

How do I get it to load the file test.php that I have saved??? Is there any special place to save files to?

Thanks

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

Virtual Host Config

Postby ruturajv » Wed Sep 17, 2003 9:35 pm

open your httpd.conf file "I hope it is the config file for apache 2 as well!!"

Now at the end add the following

Code: Select all

<VirtualHost 127.0.0.1>
   DocumentRoot "path_to_your_dir_where_php_page_is"
   ServerName Localhost1271
    DirectoryIndex index.php
</VirtualHost>


This will set the virtualhost for the IP 127.0.0.1, Be sure you know the filename as the directory listing is turned off by default.
Once you make the changes to the httpd.conf file, restart your server!
And have you added the .php extentsion??? Be sure you do that :!: :!:

beedyb220
New php-forum User
New php-forum User
Posts: 2
Joined: Wed Sep 17, 2003 9:04 pm

Postby beedyb220 » Wed Sep 17, 2003 10:07 pm

Thanks..

That worked like a charm.


Return to “PHP Installation”

Who is online

Users browsing this forum: No registered users and 1 guest