Nginx
how to start
https://nginx.org/en/docs/beginners_guide.html
comparison
https://serverguy.com/comparison/apache-vs-nginx/
The main difference between Apache and NGINX lies in their design architecture.
Apache uses a process-driven approach and creates a new thread for each request.
=> Apache can (easily) lead to huge resource usage
NGINX uses an event-driven architecture to handle multiple requests within one thread.
=> much faster and far less resource usage
originaly, ngix was mostly used as an Apache supplement, mainly for for serving static files
[ wm ; probably superior in static files then]
today, it is a complete web server
- often used as a reverse proxy, load balancer, mail proxy and for HTTP caching.
- ? doesn’t proces dynamic content ?
- more secure then apache , smaller code base , smaller installed server base
locations
/etc/nginx/
/etc/nginx/conf.d/
/usr/share/nginx/html/ : static html files to be served – bestaat niet op OpenWRT
user defined :
svr/nginx/
svr/nginx/default ( 3 default responses bij error , not found en main index
/etc/init.d/ –> nginx ( service start config file)
/var/log/nginx/ –> empty
/var/lib/nginx
/usr/bin/nginx-util
#### config
/etc/nginx/nginx.conf
server block. This defines a new context for NGINX to listen for.
most simple index.html
<!doctype html>
This is an example paragraph.