How to make local drive available in apache localhost
Posted
by
Ronald Allan
on Server Fault
See other posts from Server Fault
or by Ronald Allan
Published on 2012-11-19T22:17:01Z
Indexed on
2012/11/21
17:02 UTC
Read the original article
Hit count: 342
How can I make my "Drive D:" "Drive E" available in localhost.
I'm running apache on my backtrack machine. My default is /var/www/. Every directory I created inside the /var/www/ is available and all working fine.
Let's say I created /var/www/PENTEST/ the contents of that PENTEST directory can be accessed through:
localhost/PENTEST/
How can I make this work: localhost/media/DATA/
The /media/DATA/ is my DRIVE D:
I edited this:
ServerAdmin webmaster@localhost
DocumentRoot /media/DATA/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /media/DATA/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
Still not working. I'm getting 404.
# #I figured it out. Thank for the post of "RiggsFolly" which can be found here: http://forum.wampserver.com/read.php?2,89163.
I just have to change this:
ServerAdmin webmaster@localhost
DocumentRoot /media/DATA/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /media/DATA/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
Into this:
ServerAdmin webmaster@localhost
DocumentRoot D:/media/DATA/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory D:/media/DATA/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
© Server Fault or respective owner