Documentation citation https://docs.python.org/3/library/http.server.html#module-http.server
Warning: http.server is not recommended for production. It implements only basic security checks.
First of all, you donβt need python at all for serving static files. Just use a real HTTP server like Apache or NGinx. If you want a quick solution, just find a dock container with a pre-configured image suitable for your needs. This is NGinx . Definitely a docker is an indispensable tool that you will not regret to study.
$ docker run --name mysite-nginx -v /mysite:/usr/share/nginx/html:ro -p 80:80 -d nginx
Leo
source share