nginx
About
Install
1 apt install nginx
or install nginx from source
Configure
Basic server configuration
http2
https://www.nginx.com/blog/http2-module-nginx/
- Binary protocol
- harder to debug
- a tick faster
- a bit less CPU usage
- Multiplexing
- Lowers overhead of connection establishment
- Header compression
- Prioritization
/etc/nginx/sites-available/vhost.conf
Streams
The directive stream may only be embedded in the context main.
nginx.org docs - Module ngx_stream_core_module #stream
Modules are included in the main configuration. So we can also include their configuration from there
/etc/nginx/modules-available/51-mod-stream_ff-sync.conf
Now enable the config
Basic Auth
Nginx supports
crypt()
- unix crypt (truncated to 8 chars + 12 bit entropy) insecure
$2y$ bcrypt (blowfish and crypt)
- with configurable costs between 4 and 17 (very slow)
$5$ SHA-256 crypt()
$6$ SHA-512 crypt()
apr1
- salted MD5-based, 1000 rounds
- APR is the acronym for the
- Password schemes as defined in
- Only the following schemes are implemented: '{PLAIN}', '{SHA}' and '{SSHA}'
- plain passwords
- on Windows and Netshare
For information on how to create a password file please see:
HTTP/Apache2#htpasswd
In your location configuration (or .htaccess) place the following lines