Solved

Apache Directory browsing

Posted on 2004-09-21
7
242 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
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

791 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