wsgi를 사용하여 apache2에 플라스크 응용 프로그램을 배포하는 데 문제가 있습니다. 아파치 2는 마치 잘 돌아가는 것처럼 다시 시작하지만, 브라우저로 액세스하려고하면 "403 Forbidden"오류가 발생합니다. 여기 내 코드가있다.wsgi를 사용하여 아파치에 플라스크 앱을 배포 할 때 권한 오류를 해결하는 방법은 무엇입니까?
webroombooker.wsgi
#!/usr/bin/python
import sys
import logging
logging.basicConfig(stream=sys.stderr)
sys.path.insert(0,"/home/pi/Website/webroombooker.py")
from webroombooker import app as application
여기.
/home/pi/Website
├── hellotest.py
├── hellotest.pyc
├── index.html.en
├── index.html.en~orig.html
├── main.html
├── PoweredByMacOSX.gif
├── PoweredByMacOSXLarge.gif
├── templates
│ ├── profile.html
│ ├── registration2.html
│ ├── registration.html
│ ├── seleniumtemplate2.html
│ └── seleniumtemplatetime.html
├── Test
├── webroombooker.py
├── webroombooker.pyc
└── webroombooker.wsgi
플라스크 응용 프로그램과 WSGI 파일에있는 디렉토리 내 디렉토리 트리입니다 그리고 여기에 아파치 가상 호스트 파일입니다. 여기
<VirtualHost *:80>
ServerName localhost
WSGIScriptAlias//home/pi/Website/webroombooker.wsgi
<Directory /home/pi/Website/webroombooker.py/>
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
실제로 지금 에러를 도시하는 관련 에러 로그 라인 이다.
[Thu Nov 17 14:07:39.939432 2016] [authz_core:error] [pid 15949:tid 1972368432] [client ::1:55490] AH01630: client denied by server configuration: /home/pi/Website/webroombooker.wsgi
[Thu Nov 17 14:07:40.260731 2016] [authz_core:error] [pid 15949:tid 1963979824] [client ::1:55490] AH01630: client denied by server configuration: /home/pi/Website/webroombooker.wsgi, referer: http://localhost/
[Thu Nov 17 14:07:43.506135 2016] [authz_core:error] [pid 15949:tid 1955591216] [client ::1:55490] AH01630: client denied by server configuration: /home/pi/Website/webroombooker.wsgi
[Thu Nov 17 14:07:43.702542 2016] [authz_core:error] [pid 15949:tid 1947202608] [client ::1:55490] AH01630: client denied by server configuration: /home/pi/Website/webroombooker.wsgi, referer: http://localhost/
저는 정말 고맙습니다. 정말 고맙습니다. 도와 주셔서 진심으로 감사드립니다.
아파치 로그 파일의 관련 행을 표시 할 수 있습니까? –
사이트를 요청할 때 어떤 이유로 아파치 로그에 오류가 표시되지 않습니다. –
실제로 오류가 표시됩니다. 나는 그것을 게시 할 것이다 –