Skip to content

Instantly share code, notes, and snippets.

@wolfg1969
Last active February 26, 2022 03:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save wolfg1969/6110255 to your computer and use it in GitHub Desktop.
Save wolfg1969/6110255 to your computer and use it in GitHub Desktop.
pypiserver.wsgi
<VirtualHost *:80>
ServerAdmin foo@bar.com
ServerName pypi.dev.example.com
ErrorLog logs/pypiserver-error_log
CustomLog logs/pypiserver-access_log common
DocumentRoot /var/www/html
<Directory /var/www/html>
Order allow,deny
Allow from all
</Directory>
WSGIPassAuthorization On
WSGIScriptAlias / /var/www/wsgi-scripts/pypiserver.wsgi
WSGIDaemonProcess pypisrv user=apache group=apache processes=5 threads=15 maximum-requests=500 umask=0007 display-name=wsgi-pypisrv inactivity-timeout=300
WSGIProcessGroup pypisrv
<Directory /var/www/wsgi-scripts>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
# An example pypiserver.wsgi for use with apache2 and mod_wsgi, edit as necessary.
#
# apache virtualhost configuration for mod_wsgi daemon mode:
# Alias /robots.txt /srv/yoursite/htdocs/robots.txt
# WSGIPassAuthorization On
# WSGIScriptAlias / /srv/yoursite/cfg/pypiserver.wsgi
# WSGIDaemonProcess pypisrv user=pypisrv group=pypisrv processes=1 threads=5 maximum-requests=500 umask=0007 display-name=wsgi-pypisrv inactivity-timeout=300
# WSGIProcessGroup pypisrv
PACKAGES = "/var/www/packages"
HTPASSWD = "/var/www/.htpasswd"
import pypiserver
application = pypiserver.app(PACKAGES, redirect_to_fallback=False, password_file=HTPASSWD, overwrite=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment