좋아요, 따라서 this 자습서를 따르고 있습니다. 내 로컬 서버를 통해 내 사이트에 액세스하려고하면이 특별한 오류가 발생합니다.Django on apache wtih mod_wsgi (Linux) - 403 금지됨
Forbidden You don't have permission to access/on this server. Apache/2.4.6 (Ubuntu) Server at mysite.com Port 80
.
Αs 내가 옳은 일을했는지 (나는 두 번 제안 된 방법을 구현했다.) 이것은 쉽게 OS 오류 일 수있다. (나는 민트 16을 실행 중이다. 오류는 (Ubuntu)
이다.) 그러나 나는 경험이 없으므로 나는 도움이 필요해.
나는 약간의 연구를했지만 다른 사람들과 함께이 질문들 중 어느 것도 (1, 2) 질문에 답하지 않은 것 같습니다.
그래서 여기 mysite.conf
파일입니다
<VirtualHost *:80>
WSGIScriptAlias//home/nick/Mysite/mysite.wsgi
ServerName mysite.com
Alias /static /var/www/mysite/static/
<Directory /var/www/mysite/>
Options All
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
및 IP 주소가 내 로컬 호스트로 리디렉션하는 방법을 보여줍니다 내 hosts
파일 :
127.0.0.1 localhost
127.0.1.1 nick-HP-Notebook-PC
192.168.1.2 mysite.com
192.168.1.2 mysite2.com
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
그래서 당신은 문제가 되죠 것. 이것은 단순히 Linux 관련 오류 일 수 있습니까? 및 프로젝트 또는 기타 사항에 대한 추가 정보가 필요하면 알려주십시오.
감사합니다.
업데이트 : 다음
내 .wsgi
파일입니다 : 내가 서버를 다시 시작할 때 나는 또한이 메시지가
import os
import sys
sys.path = ['/var/www/mysite'] + sys.path
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
가.
Restarting web server apache2 AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message [ OK ]
아마도 도움이 될까요?
. wsgi 파일이 좋다. 프로젝트의 경로도 –
wsgi에 입력 한 경로가 맞습니까? 그리고 또한 오류를 게시하십시오 – Anup
당신은'WSGIScriptAlias / home/nick/Mysite/mysite.wsgi' 경로를 언급하고 있습니까? 네, 이것이 정확한 경로라고 확신합니다. 어떤 오류 ?? –