====== Prosty vhost dla Pythona w Apache ====== Założenia: * aplikacje pythonowe to Jupyter Notebook, nasłuchujące na portach 8001-8012, * chcę mieć poszczególne notebooki jako "podkatalogi" python.baszarek.pl, * mam certyfikat z Let's Encrypt. VirtualHost *:80> ServerName python.baszarek.pl:80 Redirect permanent / https://python.baszarek.pl/ ServerName python.baszarek.pl:443 ServerAdmin root@localhost # PreserveHost pomaga przy logowaniu ProxyPreserveHost On ProxyPass /errno http://127.0.0.1:8001/errno ProxyPassReverse /errno http://127.0.0.1:8001/errno ProxyPass /glob http://127.0.0.1:8002/glob ProxyPassReverse /glob http://127.0.0.1:8002/glob ProxyPass /math http://127.0.0.1:8003/math ProxyPassReverse /math http://127.0.0.1:8003/math ProxyPass /os http://127.0.0.1:8004/os ProxyPassReverse /os http://127.0.0.1:8004/os ProxyPass /pathlib http://127.0.0.1:8005/pathlib ProxyPassReverse /pathlib http://127.0.0.1:8005/pathlib ProxyPass /pickle http://127.0.0.1:8006/pickle ProxyPassReverse /pickle http://127.0.0.1:8006/pickle ProxyPass /random http://127.0.0.1:8007/random ProxyPassReverse /random http://127.0.0.1:8007/random ProxyPass /shutil http://127.0.0.1:8008/shutil ProxyPassReverse /shutil http://127.0.0.1:8008/shutil ProxyPass /subprocess http://127.0.0.1:8009/subprocess ProxyPassReverse /subprocess http://127.0.0.1:8009/subprocess ProxyPass /tkinter http://127.0.0.1:8010/tkinter ProxyPassReverse /tkinter http://127.0.0.1:8010/tkinter ProxyPass /zlib http://127.0.0.1:8011/zlib ProxyPassReverse /zlib http://127.0.0.1:8011/zlib ProxyPass /zoneinfo http://127.0.0.1:8012/zoneinfo ProxyPassReverse /zoneinfo http://127.0.0.1:8012/zoneinfo ProxyPass ws://127.0.0.1:8001/errno/api/kernels/ ProxyPassReverse ws://127.0.0.1:8001/errno/api/kernels/ ProxyPass ws://localhost:8001/errno/terminals/websocket/ ProxyPassReverse ws://localhost:8001/errno/terminals/websocket/ ProxyPass ws://127.0.0.1:8002/glob/api/kernels/ ProxyPassReverse ws://127.0.0.1:8002/glob/api/kernels/ ProxyPass ws://localhost:8002/glob/terminals/websocket/ ProxyPassReverse ws://localhost:8002/glob/terminals/websocket/ ProxyPass ws://127.0.0.1:8003/math/api/kernels/ ProxyPassReverse ws://127.0.0.1:8003/math/api/kernels/ ProxyPass ws://localhost:8003/mathterminals/websocket/ ProxyPassReverse ws://localhost:8003/math/terminals/websocket/ ProxyPass ws://127.0.0.1:8004/os/api/kernels/ ProxyPassReverse ws://127.0.0.1:8004/os/api/kernels/ ProxyPass ws://localhost:8004/os/terminals/websocket/ ProxyPassReverse ws://localhost:8004/os/terminals/websocket/ ProxyPass ws://127.0.0.1:8005/pathlib/api/kernels/ ProxyPassReverse ws://127.0.0.1:8005/pathlib/api/kernels/ ProxyPass ws://localhost:8005/pathlib/terminals/websocket/ ProxyPassReverse ws://localhost:8005/pathlib/terminals/websocket/ ProxyPass ws://127.0.0.1:8006/pickle/api/kernels/ ProxyPassReverse ws://127.0.0.1:8006/pickle/api/kernels/ ProxyPass ws://localhost:8006/pickle/terminals/websocket/ ProxyPassReverse ws://localhost:8006/pickle/terminals/websocket/ ProxyPass ws://localhost:8007/random/terminals/websocket/ ProxyPassReverse ws://localhost:8007/random/terminals/websocket/ ProxyPass ws://127.0.0.1:8007/random/api/kernels/ ProxyPassReverse ws://127.0.0.1:8007/random/api/kernels/ ProxyPass ws://localhost:8008/shutil/terminals/websocket/ ProxyPassReverse ws://localhost:8008/shutil/terminals/websocket/ ProxyPass ws://127.0.0.1:8008/shutil/api/kernels/ ProxyPassReverse ws://127.0.0.1:8008/shutil/api/kernels/ ProxyPass ws://localhost:8009/subprocess/terminals/websocket/ ProxyPassReverse ws://localhost:8009/subprocess/terminals/websocket/ ProxyPass ws://127.0.0.1:8009/subprocess/api/kernels/ ProxyPassReverse ws://127.0.0.1:8009/subprocess/api/kernels/ ProxyPass ws://localhost:8010/tkinter/terminals/websocket/ ProxyPassReverse ws://localhost:8010/tkinter/terminals/websocket/ ProxyPass ws://127.0.0.1:8010/tkinter/api/kernels/ ProxyPassReverse ws://127.0.0.1:8010/tkinter/api/kernels/ ProxyPass ws://localhost:8011/zlib/terminals/websocket/ ProxyPassReverse ws://localhost:8011/zlib/terminals/websocket/ ProxyPass ws://127.0.0.1:8011/zlib/api/kernels/ ProxyPassReverse ws://127.0.0.1:8011/zlib/api/kernels/ ProxyPass ws://localhost:8012/zoneinfo/terminals/websocket/ ProxyPassReverse ws://localhost:8012/zoneinfo/terminals/websocket/ ProxyPass ws://127.0.0.1:8012/zoneinfo/api/kernels/ ProxyPassReverse ws://127.0.0.1:8012/zoneinfo/api/kernels/ CustomLog /var/log/httpd/notebook-access.log combined ErrorLog /var/log/httpd/notebook-errors.log Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains" SSLEngine on SSLProtocol -all +TLSv1.2 Include /etc/letsencrypt/options-ssl-apache.conf SSLCertificateFile /etc/letsencrypt/live/python.baszarek.pl/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/python.baszarek.pl/privkey.pem