WSGIServer errors when trying to run Django app

前端 未结 2 1187
我寻月下人不归
我寻月下人不归 2020-12-15 12:26

Firstly, here\'s my script:

#!/usr/bin/python
import sys, os

sys.path.append(\'/home/username/python\')
sys.path.append(\"/home/username/python/flup\")
sys.         


        
2条回答
  •  温柔的废话
    2020-12-15 12:38

    Solved it. This .htaccess file did the trick, for whatever reason. I swear I tried all this before...

    AddHandler fcgid-script .fcgi
    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /
    RewriteRule ^(media/.*)$ - [L]
    RewriteRule ^(adminmedia/.*)$ - [L]
    RewriteCond %{REQUEST_URI} !(cgi-bin/myproject.fcgi)
    RewriteRule ^(.*)$ cgi-bin/myproject.fcgi/$1 [L]
    

提交回复
热议问题