How to use Django with Apache and mod_wsgi

看板Python作者 (881 forever)時間11年前 (2014/09/08 16:23), 11年前編輯推噓1(106)
留言7則, 4人參與, 最新討論串1/4 (看更多)
請問一下 如果我要在apache上用django到底要怎麼用啊 弄了好幾天都不得其門而入 apache 還有mod_wsgi都裝了啊 我照著下面官網說的指示做 https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/modwsgi/ 右邊是我放wsgi.py的地方(內建)C:/Users/mango/Desktop/deploy_test/mysite/mysite WSGIScriptAlias / C:/Users/mango/Desktop/deploy_test/mysite/mysite/wsgi.py WSGIPythonPath C:/Users/mango/Desktop/deploy_test/mysite/mysite <Directory C:/Users/mango/Desktop/deploy_test/mysite/mysite> <Files wsgi.py> Order deny,allow Allow from all </Files> </Directory> 我的目標是Django 內建的admin這個網只要能進去 現在是有哪些眉角沒注意到嗎? 希望各位大大教一下 網址輸入http://localhost/admin 403 error Forbidden You don't have permission to access /admin on this server -- -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.112.218.124 ※ 文章網址: http://www.ptt.cc/bbs/Python/M.1410164587.A.F14.html

09/08 17:21, , 1F
最明顯的問題是 WSGIPythonPath 要出來一層
09/08 17:21, 1F

09/08 17:21, , 2F
然後請附上 error log 謝謝
09/08 17:21, 2F
※ 編輯: left (140.112.218.124), 09/08/2014 17:41:30

09/08 17:42, , 3F
已經附上error message摟~~
09/08 17:42, 3F

09/08 17:43, , 4F
uranusjr 出來一層的意思是?
09/08 17:43, 4F

09/08 18:14, , 5F
真心建議如果在windows上就用微軟那套,不然正式Release
09/08 18:14, 5F

09/08 18:14, , 6F
又要一堆工夫
09/08 18:14, 6F

09/09 10:34, , 7F
windows... 幫不上忙 在 linux 上搭 apache 倒是可以幫忙
09/09 10:34, 7F
文章代碼(AID): #1K3MThyK (Python)
文章代碼(AID): #1K3MThyK (Python)