Solved

Apache Directory browsing

Posted on 2004-09-21
7
228 Views
Last Modified: 2008-02-26
Does anyone know how I can enable apache to browse in a partition other than where the home page is stored?  I have my Homepage in the I: partition, windows xp pro installed int he C: partition.  Is it paossible to browse the C: or A: drive and how would I set it up?  Also is it possible to browse a mapped network drive?
0
Comment
Question by:firemanrob
7 Comments
 
LVL 6

Assisted Solution

by:Leviter
Leviter earned 200 total points
ID: 12120191
Take a look at this: http://httpd.apache.org/docs-2.0/mod/mod_alias.html

I think it is what you're looking for.....
0
 
LVL 6

Expert Comment

by:nishasrilankan
ID: 12120511
You cannot browse the directories higher than the root directory.
0
 

Expert Comment

by:madisspiegel
ID: 12213699
As Leviter suggested above, you should use Apache's mod_alias, it's usually loaded in apache default install. Put this in your httpd.conf file below the last </directory>:


Alias /c "C:/"

<directory "C:/">
Options +Indexes
Order allow,deny
Allow from all
</directory>

You have to change the allow,deny part, to make your hard disks NOT world readable.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:firemanrob
ID: 12219096
Awesome, I did it and it works great!  Is there a way to view a networked drive from my webpage outside of my intranet?  I have a mapped drive from another computer mapped as the B: drive on my server computer.  Is there a way I can browse this as well?
0
 

Expert Comment

by:madisspiegel
ID: 12221965
You should be able to do it just the same way...

Alias /b "B:/"

<directory "B:/">
Options +Indexes
Order allow,deny
Allow from all
</directory>

Just change the path alias and two ocurrences of the directory you'd like to browse.
Btw, Options +Indexes is the command that allows apache to show directory contents.
0
 

Author Comment

by:firemanrob
ID: 12222093
I tried that and it didn't work.  I'm not sure if it's possible to view a network drive I don't think I could on IIS.  Do you know another way?  Also is there a PHP script that would allow my to delete files on my server from the internet?
0
 

Accepted Solution

by:
madisspiegel earned 300 total points
ID: 12222438
Yep, sorry, my mistake.

The answer is here:

http://httpd.apache.org/docs-2.0/platform/windows.html#winsvc

You have to make a new account for apache with networking privileges (tutorial is in the link above) and then apache can access the network drive with the code in my previous post. By default apache runs as the system user (LocalSystem account) that doesn't have the required privileges.

Yes, PHP is able to delete files with correct access rights, there are many free php file managers that are able to do it. For example, http://www.invisionfilemanager.com/ (free with restricted license)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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.  …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to dynamically set the form action using jQuery.
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…

705 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

17 Experts available now in Live!

Get 1:1 Help Now