-
Notifications
You must be signed in to change notification settings - Fork 258
Nginx
Good choice! Nginx is prefered! :)
Nginx does not support .htaccess files. -> remove them!
Hint: One advantage from Nginx over Apache is, that
.htaccessdon´t have to be parsed on each request. -> This lowers TTFB.
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 setup, based on "hp5b"´s example conf files, on Nginx v1.13.8, PHP v7.2.2, MariaDB v10.13.8 over HTTP/2.
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
workeroptions (depends on your hardware) - Set global
loggingoptions (path, format,...) - Set
charsetoptions - Set
timeoutoptions - Set
bufferoptions - Set global
file_cacheoptions - Enable
gzip - Set
gzipoptions - Optimize
TCPsettings for Single Page Apps - Include main server configs (e.g.
sites_enabled/pathfinder.conf, see below)
Server config (my pathfinder.conf)
In detail:
- Rewrite non
www.towww. - Rewrite
http://tohttps:// - Enable HTTP/2 protocol
- Listen to
https://www.pathfinder-w.space - Set
ssloptions for certificates - Include basic
ssl.conf - Set
access_loganderror_logoptions - Dispatch all requests to
index.php - Set PHP
fastcgioptions - Include basic
fastcgi_params - Include hp5b
basic.conf
Hint: Don´t forget to restart your server after config change.
If you can see the "Landingpage" with the "Login"-form on https:/www.[YOUR_DOMAIN]. You are done! :)


