1

Assuming the server uses Apache, where it is the most adequate folder to place uploaded files, contents and data in FreeBSD? This question is the extension to this one but specific for FreeBSD.

The Handbook only determines where the code files must be placed. For security reasons, data is kept separate from the DocumentRoot.

Looking at the HIER section it seems that I need to create a new folder under /usr/local perhaps /usr/local/srv ?

It seems odd to me as it says such /usr/local should contain

'local executables, libraries, etc.'

but says nothing about data.

1 Answers1

0

With a few more years of experience, I think I can self-answer:

  • If uploaded into /var/www, it must be stored somewhere but outside of the DocumentRoot. With this approach, the backup is easier, as the backup scripts can simply take the entire /var/www folder and subfolders, with data and code.
  • Another suitable place is /var/ . As stated in Chapter 3. FreeBSD Basics - 3.5. Directory Structure.

/var/ Multi-purpose log, temporary, transient, and spool files. A memory-based file > system is sometimes mounted at /var. This can be automated using the varmfs-relate

  • Ultimately, user Apache may have a /home folder created to read/write data.
Greenonline
  • 2,235
  • 11
  • 24
  • 30