Skip to content
Mark Friedrich edited this page Jan 8, 2016 · 12 revisions

Good coice! Nginx is prefered! :)

Remove .htaccess files (step 5 optional)

Nginx does not support .htaccess files. -> remove them!

Hint: One advantage from Nginx over Apache is, that .htaccess don´t have to be parsed on each request. -> This lowers TTFB.


Server configuration (step 6)

The following example configuration is used in my "Production" environment. If you need a configuration for "Local" testing/developing please contact me ;). I run PATHFINDER in a Virtual-Host configuration setup, based on "hp5b´s example config, on Nginx v1.9.9 (Released 2015-12-09) and PHP v7.0.1 *(Released 2015-12-17).

Important: Some configuration options/values may vary between versions! Do not blind copy&paste my configuration, some options/values depend on your server hardware!

HTTP config (my nginx.conf)

In detail:

  • Set server user to nginx
  • Set worker options (depends on your hardware)
  • Set global logging options (path, format,...)
  • Set charset options
  • Set timeout options
  • Set buffer options
  • Set global file_cacheoptions
  • Enable gzip
  • Set gzip options
  • Optimize TCP settings for Single Page Apps
  • Include main server configs (e.g. sites_enabled/pathfinder.conf, see below)
Server config (my pathfinder.conf)

In detail:

Clone this wiki locally