Skip to content

Instantly share code, notes, and snippets.

@gcavalcante8808
Created March 20, 2014 09:06
Show Gist options
  • Save gcavalcante8808/9659919 to your computer and use it in GitHub Desktop.
Save gcavalcante8808/9659919 to your computer and use it in GitHub Desktop.
wsgi file
import sys
import os
sys.path.insert(0, '/var/www/html/htpwd')
from htpwd import app as htpwdapp
def application(req_environ, start_response):
os.environ['HTPASSWD_FILE'] = req_environ['HTPASSWD_FILE']
os.environ['SECRET_KEY'] = req_environ['SECRET_KEY']
os.environ['REGEXP'] = req_environ['REGEXP']
os.environ['TARGET_PAGE'] = req_environ['TARGET_PAGE']
return htpwdapp(req_environ, start_response)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment