0

I'm working on a new setup for a "stateless server" that should be used as an Apache/Php node to deliver contents over the internet.

My aim is to move the DocumentRoot and the ServerRoot to NFS (it will be EFS - Elastic File System on Aws) so that I will have a single network location where all my data and config files will be stored.

The OS is Debian Stretch.

While reading the Debian out of the box apache main config file, I've found the following comment:

NOTE! If you intend to place this on an NFS (or otherwise network) mounted filesystem then please read the Mutex documentation (available at http://httpd.apache.org/docs/2.4/mod/core.html#mutex>); you will save yourself a lot of trouble.

Since I've not found much documentation about moving the Apache ServerRoot, I have some questions:

  • is the Mutex locking really needed even for single server access?
  • after the Mutex locking setup, will I be able to access the NFS files from several servers at once?
  • which "mechanism" should I choose?
  • is there anything else I shoud be aware of?
0

The mutex locking isn't needed for a single server as it's basically to prevent write conflicts, but if you are going to scale out and will potentially be writing any files into your shared filesystem from multiple servers consider using it. Use the apr default or file:// for most purposes.

0

If you read further down in the URL you quote you will see that the mutex feature is used for many things, including SSL, for some MPMs, for auth, etc... It has nothing to do with write operations or not.

You should either use a local directory not over NFS, or even a tmpfs, as this does not resist an Apache restart anyway. Otherwise use a semaphore kind of one, like sem

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.