Nginx

Nginx is used to handle static content and proxy all other requests to the website module. It also handles most of the web security as a SSL/TLS front-end and more generally as a hardened attack surface.

Nginx is easily capable of handling 100+ https connections per second per cpu core (on fairly old and weak hardware, at that). It is unlikely to be the performance bottleneck.

class iceprod.server.nginx.Nginx(*args, **kwargs)[source]

Wrapper around the Nginx webserver.

Set up Nginx

kill()[source]

Stop server

logrotate()[source]

Rotate log files

start()[source]

Start server

stop()[source]

Stop server

iceprod.server.nginx.deleteoldlogs(filename, days=30)[source]

Delete old log files

iceprod.server.nginx.find_mime(hints=None)[source]

Locate mime.types file, if possible.

iceprod.server.nginx.find_nginx()[source]

Locate nginx, if possible.

iceprod.server.nginx.rotate(filename)[source]

Rotate a filename. Useful for log files.