====== nginx ======
**nginx** ist ein [[Webserver]].
===== Konfiguration =====
==== Directory Listing ====
[...]
location /somedir {
autoindex on;
}
==== Block Bots ====
# Bad bots filter code
# provided by http://badbots.vps.tips
if ($http_user_agent ~* "SentiBot" ) {
return 403;
}
===== Monitoring =====
==== How do I calculate connections per seconds? ====
{{:linux:nginx_status.png |}}
----
- 27 = Number of all open connections
- 221901 = Accepted connections
- 221901 = Handled connections
- 442577 = Handles requests
* Requests per connection = handles requests / handled connections
* Requests per connection = 442577/221901 (pass this to bc -l using echo '442577/221901' | bc -l command)
* Requests per connection = 1.99
===== Weblinks =====
* http://nginx.org
* http://nginx.org/en/docs/
==== Howtos ====
* //[[https://ho2e.de/wallabag/?view=tag&id=181|Nginx bei Wallabag]]//
* [[https://ho2e.de/wallabag/index.php?view=view&id=185|HSTS in nginx konfigurieren]] ([[HSTS]])
* [[https://ho2e.de/wallabag/index.php?view=view&id=216|How to monitor NGINX]] (1)
* [[https://ho2e.de/wallabag/index.php?view=view&id=217|How to collect NGINX metrics]] (2)
* [[https://ho2e.de/wallabag/index.php?view=view&id=218|How to monitor NGINX performance with Datadog]] (3)
* [[https://ho2e.de/wallabag/index.php?view=view&id=214|Optimizing NGINX and PHP-fpm for high traffic sites]]