?
Solved

php/apachy setup

Posted on 2011-05-10
5
Medium Priority
?
282 Views
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.
0
Comment
Question by:sammySeltzer
  • 3
  • 2
5 Comments
 
LVL 29

Author Comment

by:sammySeltzer
ID: 35732563
I may have *FOUND* the solution.

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

I will wait for confirmation though.

Thanks
0
 
LVL 13

Expert Comment

by:haloexpertsexchange
ID: 35732860
That is the correct solution.
You add anything that you want accessible to on the web with apache to the htdocs folder.
0
 
LVL 29

Author Comment

by:sammySeltzer
ID: 35732915
Great!

Thanks a lot.

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

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

http://localhost/WorkersComp/
it shows the directory listing all the files.

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

http://localhost/WorkersComp/default.php.

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?
0
 
LVL 13

Accepted Solution

by:
haloexpertsexchange earned 2000 total points
ID: 35732966
you change the default pages in the apache httpd.conf file.
There is an explanation here http://www.cyberciti.biz/faq/apache-display-or-change-a-default-page-other-than-indexhtml/
0
 
LVL 29

Author Comment

by:sammySeltzer
ID: 35734761
thx
0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
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…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses
Course of the Month14 days, 20 hours left to enroll

840 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