Apache Directory browsing

Posted on 2004-09-21
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?
Question by:firemanrob
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Assisted Solution

Leviter earned 200 total points
ID: 12120191
Take a look at this:

I think it is what you're looking for.....

Expert Comment

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

Expert Comment

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

You have to change the allow,deny part, to make your hard disks NOT world readable.
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.


Author Comment

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?

Expert Comment

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

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.

Author Comment

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?

Accepted Solution

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

The answer is here:

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, (free with restricted license)

Featured Post

Report: Liquid Web beats Amazon, Rackspace & More

A study by performance analyst firm Cloud Spectator finds that Liquid Web beats rivals Amazon, Rackspace and DigitalOcean when it comes to website and cloud application performance.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Node.js 11 82
$q.all is slower or not  in  Angularjs 2 48
Web Easy Professional 10 Embedded Facebook 1 70
type of website 13 53
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This video teaches users how to migrate an existing Wordpress website to a new domain.

739 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