PHPBuilder - Apache on WIN32 Page 4



RSS Twitter
Articles Setup And Installation

Apache on WIN32 - Page 4

by: Brian Moon
|
July 30, 2000

Now, let's try a PHP3 file. With your favorite text editor, create a file called phpinfo.php3 and put it in your htdocs folder in the Apache install folder ('c:\apache\htdocs\'). In that file put:

<?php 
phpinfo
(); 
?>

Now point your browser at http://localhost/phpinfo.php3. You should see a big table of information on PHP3 and its settings. If you do not, something is not done correctly. Be sure you have entered the lines into the conf file correctly.
Using Directory Aliases
You do not need to go moving all your stuff under the htdocs folder. If you are like me, you have a very picky way that all of your web files are laid out on your hard drive. To get Apache to point at that stuff, you need to use the Alias directive in your httpd.conf file. This is neat, but simple. All you need to do is enter something like:

Alias /mysite/ "C:/path/to/my/web/files/"

Now to have Apache server up those files, point your browser to http://localhost/mysite/. Of course you can replace 'mysite' and that path with what ever you want. So, now instead of having to move all your files, you can simply create a link to that URL and view your files that way.
A Tip For Homesite Users
This is a little off topic, but is one of the nicest features I have seen. With Homesite (I use 4.0) from Allaire you can map directories to URLs. Example. While in Homesite, select Options, Settings. Select the Browse tab. At the bottom of the dialog there is a section for server mappings. Select 'Add'. Type or browse to the path where your web files are (this is the same as the path in the Alias directive). Then enter the URL path for that mapping ('http://localhost/mysite/'). Now hit OK and OK again. Now when you click browse or launch external browsers from Homesite it will map it through Apache.
There may be other editors that will do this. If you are aware of any, let me know and I will add them to the tutorial.


« Previous Page
1
|
2
|
3
|
4
|
5
Next Page »

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Brian Moon

Comment:



Comment:

(Maximum characters: 1200). You have characters left.