Apache(2.2.22)とmod_wsgi(3.4)でdjango(1.6)プロジェクトを実行しようとしています。私のpythonは2.7.3、ubuntu 12.04のデフォルトです。私はすべてをchmod 777として/ var/wwwから下に設定しました。スクリプトのヘッダの許可 を拒否されましたし、その後 早すぎる終わり:残念ながら、それは私の読書のためのファイルを開くApacheは読み込み用ファイルを開く際にエラーが発生しました:Permission Denied
エラー与えwsgi.py
を誰もが私が間違ってやっているものを私に伝えることができますか? 私はここに
[email protected]:/var/www/Imse_dev2/Imse/Imse# tail -f /var/log/apache2/error.log
[Tue Jan 14 14:16:04 2014] [notice] caught SIGTERM, shutting down
[Tue Jan 14 14:16:08 2014] [notice] Apache/2.2.22 (Ubuntu) mod_wsgi/3.4 Python/2.7.3 configured -- resuming normal operations
[Tue Jan 14 14:16:28 2014] [error] /var/www/Imse_dev2/Imse
Error opening file for reading: Permission denied
[Tue Jan 14 14:21:32 2014] [error] [client 127.0.0.1] Premature end of script headers: wsgi.py
[Tue Jan 14 14:29:13 2014] [notice] caught SIGTERM, shutting down
[Tue Jan 14 14:29:13 2014] [notice] Apache/2.2.22 (Ubuntu) mod_wsgi/3.4 Python/2.7.3 configured -- resuming normal operations
[Tue Jan 14 14:29:17 2014] [error] /var/www/Imse_dev2/Imse
Error opening file for reading: Permission denied
[Tue Jan 14 14:34:21 2014] [error] [client 127.0.0.1] Premature end of script headers: wsgi.py
そしてまた私のerror.logを投稿しています私のhttpd.confファイル
#LimitRequestLine 200475
#LimitRequestFieldSize 200475
WSGIDaemonProcess imse_dev2_wsgi python-path=/var/www/Imse_dev2/Imse/Imse
#LoadModule deflate_module modules/mod_deflate.so
#LoadModule headers_module modules/mod_headers.so
<VirtualHost *:80>
ServerName whq-4
DocumentRoot /var/www/
#Header set Access-Control-Allow-Origin "*"
Alias /static /var/www/Imse_dev2/Imse/static
Alias /favicon.ico /var/www/favicon.ico
# Header set Access-Control-Allow-Origin "*"
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
WSGIScriptAlias /imse_dev2 /var/www/Imse_dev2/Imse/Imse/wsgi.py
<Directory /var/www/Imse_dev2/Imse/Imse>
WSGIProcessGroup imse_dev2_wsgi
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</VirtualHost>
私は、Apache 2.2のためにあなたがmod_wsgiを3.3 – yuvi
を使用して使用する必要があることだと思いますok ok、私に試してみましょう... – Sayantan
なぜdownvote? – trpt4him