logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Document root on shared network drive
Author
yds



Joined: 05 Dec 2017
Posts: 1
Location: canada

PostPosted: Thu 07 Dec '17 4:22    Post subject: Document root on shared network drive Reply with quote

I have a LAMP server running on ubuntu 16 in a VM. I would like to have my Document root folders located on my storage drives on the host machine. In my apache2.conf file I have defined the Directory set up as
Code:
<Directory //192.168.2.22/storage/Websites/>
   Options Indexes FollowSymLinks
   AllowOverride None
   Require all granted
</Directory>

In my sites-available conf file I have Document Root set up as
Code:
DocumentRoot //192.168.2.21/storage/Websites/Web1/

However, if I try to load the site, I get a 403 Forbidden error. I'm guessing it has something to do with permissions, but I'm not sure. The web folder is set up with R/W permissions for everyone.

Any pointers??
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Thu 07 Dec '17 17:13    Post subject: Reply with quote

If you run apache as service with the normal service account you can't. Cause the normal service account is not allowed to do anything over the network.
If you want to do that, you have to create a new local user who has access to the network share and change the service acount from apache to that user.
it might be that when you restart the computer / windows that after reboot that apache will not start if the network drive is not available.
Back to top


Reply to topic   Topic: Document root on shared network drive View previous topic :: View next topic
Post new topic   Forum Index -> Apache