Link to home
Start Free TrialLog in
Avatar of firemanrob
firemanrob

asked on

Apache Directory browsing

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?
SOLUTION
Avatar of Leviter
Leviter
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You cannot browse the directories higher than the root directory.
Avatar of madisspiegel
madisspiegel

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.
Avatar of firemanrob

ASKER

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?
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.
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?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial