What's the best directory structure (aka "where to put websites html files") when php-fpm is running?

Actually I have one user per website (so for example there is the website example.com and the user example).

Should I put the html files inside:

  • /var/www/html/example/
  • /var/www/html/example.com/
  • /var/www/example/
  • /var/www/example.com/
  • /home/example/




If you set up PHP-FPM with mod_proxy_fcgi, which is newly available in Apache 2.4 for just this type of use case, you put your html and php files and all other web content files in your document root just like any other website. The Apache wiki entry for PHP-FPM has some good guidance to help you get up and running with the right configuration.

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.