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: Apache and CIFS shares |
|
Author |
|
spetsdod
Joined: 20 Dec 2012 Posts: 1 Location: United States, Anchorage
|
Posted: Fri 28 Mar '14 1:39 Post subject: Apache and CIFS shares |
|
|
I recently started building out a new network rack to provide a production web site. The new equipment stack includes a disk array providing a CIFS file share to store images to be served up by Apache.
I have had zero luck in getting Apache to properly access the imagestore from the network share. I've read more Google pages on this subject today than I can count, but I am still not having any success getting this working right.
I'll do my best to explain the configuration.
I have an ESXi host running several virtual machines. Each machine needs to be able to access the shares. Each host has multiple network interfaces, each connected to a separate subnet. The virtual machines are running Windows Server 2012 Datacenter edition.
The disk array is file mode access, with NFS and CIFS shares. It has interfaces on both subnets that each VM can reach. I have established a stand alone CIFS server, with the shares configured. They are accessible from the VMs.
I have mapped the share to a drive letter on the VM client, and it works properly from the logged in account. I have full control over files on the file system (create, modify, delete).
The VM has Apache 2.4.9 installed.
Things I've tried with no success:
created a symlink to the CIFS mounted drive into the webroot directory
added an alias to the CIFS mounted drive
added the aliased directory using the <Directory> directive
added the alias and directory directives using UNC references
I am seeing errors like "path is invalid" mostly, but when I try to add the mapped drive (f or the UNC referenced directory, the Apache service won't start.
I added a separate user for the Apache service, and added it to the group that has privileges to talk to the share, still didn't work.
I am completely befuddled that something that seems so simple is such a complex problem. I can't be the only person who ever tried to do this, and I'd like to think that it isn't an insurmountable issue.
Thanks in advance for any suggestions. |
|
Back to top |
|
KenD
Joined: 30 Jul 2013 Posts: 7 Location: US, Gainesville, FL
|
Posted: Mon 31 Mar '14 14:40 Post subject: |
|
|
Apache may be trying to start before the network shares are ready.
Check to see what the current dependencies using "sc qc Apache2.4" (assuming your service name is Apache2.4).
Note that the depend= must have a space afer it and it overwrites current dependencies, so include current dependencies. The syntax to change the dependencies is:
sc config Apache2.4 depend= "LanmanWorkstation/Tcpip/Afd"
See msg http://www.apachelounge.com/viewtopic.php?p=25340 in case you need something else started.
You will also need to give "Log on as a service" and "Act as part of the operating system" rights to %ApacheUserName% user
rem note - NTRights is part of the 2003 resource kit tools
"%RKToolsPath%\NTRights" -u %ApacheUserName% +r SeServiceLogonRight
"%RKToolsPath%\NTRights" -u %ApacheUserName% +r SeTcbPrivilege
I also find it useful to use "runas /user:ApacheUser cmd" to run apache from command line and troubleshoot. |
|
Back to top |
|
|
|
|
|
|