Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: How to allow access from c:\ to a network drive |
|
Author |
|
ConnieGoss
Joined: 08 Nov 2019 Posts: 1 Location: USA, Monroe, WA
|
Posted: Fri 08 Nov '19 19:13 Post subject: How to allow access from c:\ to a network drive |
|
|
Newbie user here. I just installed apache 2.4.39. My application is a simple php-based file search utility running on my localhost and searching files on a company network drive. I have full access to the drive in Windows. When I run my search page, the results display and the links to the files are correct, but when I click on the link nothing happens. If I right-click to open in a new tab, I get a blank page with a title "about:blank#blocked" in the tab.
I am guessing my httpd.conf needs to be modified ( <directory> section I presume? ) to permit apache access to the network drive, but I do not know the syntax to allow permission to a network drive, and have not been able to find clear instructions on this.
Here is the current (default) code. Is this what needs to change, and if so, what is the correct syntax? Or am I barking up the wrong tree? Thanks.
Code: | # Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
AllowOverride none
Require all denied
</Directory> |
|
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Fri 08 Nov '19 22:40 Post subject: |
|
|
ConnieGoss wrote: |
Code: | # Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
AllowOverride none
Require all denied
</Directory> |
|
LEAVE THAT ALONE!
You're not only barking up wrong tree but 3 limbs up in it already. That's not the varmint your after
Apache need to be running as a user that has access to the network share, so said user should be on both computers. Standard user named 'Apache' will do.
Apache configs to network shares have to accessed by UNC paths, mapped drive letters do not always work. for example; Code: | DocumentRoot //computer_name/share_name/path/in/share |
Read these sections of the manual for accessing the network;
Running Apache as a Windows Service
http://httpd.apache.org/docs/2.4/platform/windows.html#winsvc
Configuring Access to Network Resources
http://httpd.apache.org/docs/2.4/platform/windows.html#windrivemap
Edit: Clarify username on both computers. |
|
Back to top |
|
|
|
|
|
|