php/apachy setup

Posted on 2011-05-10
Last Modified: 2012-05-11
Greetings mates,

This is probably a question I should have asked before I started learning PHP.

I have a few (about 3) php applications, each on its own folder with its own files.

I have successfully setup apache, php, mysql and phpadmin and as stated, they work fine.

My (silly) question if you will, is what, if any configuration do I need to so I can easily fire up the browser and test/run each of the apps I built?

In other words, assume that I have a folder with php files on C:\ drive called workersComp.

Inside this folder, there is a default page aptly called default.php.

Then I have another folder,a lso on C:\ drive called FIB with a set of other php files and its own default.php file.

What additional config do I need to do so that I can easily open the browser and type:

http://localhost/workersComp/ and it fires up that app.

Then I can then type http://localhost/FIB/ and it works as well?

Right now, I am not able to do that.

Sorry if this too simplistic - and thanks.
Question by:sammySeltzer
    LVL 28

    Author Comment

    I may have *FOUND* the solution.

    Adding each folder in htdocs will expose it to the browser.

    I will wait for confirmation though.

    LVL 13

    Expert Comment

    That is the correct solution.
    You add anything that you want accessible to on the web with apache to the htdocs folder.
    LVL 28

    Author Comment


    Thanks a lot.

    Just one tiny (hopefully), little question and I am done.

    Right now, if I fire it up on the web like:

    it shows the directory listing all the files.

    To make it work, I have to explicitly add the default file like:


    That's not our preferred method, not the best practice anyway.

    What do I need to change, I suppose in httpd.conf ( I suppose) so users will not be required to explicitly type default.php or index.php?

    Any ideas?
    LVL 13

    Accepted Solution

    you change the default pages in the apache httpd.conf file.
    There is an explanation here
    LVL 28

    Author Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
    ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
    Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now