簡體   English   中英

AH00112:警告-Centos 6 / Apache 2.4 / Django 1.9 / mod_wsgi 3.5 / python 2.7

[英]AH00112: Warning - Centos 6 / Apache 2.4 / Django 1.9 / mod_wsgi 3.5 / python 2.7

我的GoDaddy服務器專用。 我似乎已經成功地正確設置了所有內容,但似乎無法弄清楚為什么會出現此問題:

當我重新啟動apache時:

[root@sXXX-XXX-XXX-XXX /]# /scripts/restartsrv httpd

我得到這個:

AH00112: Warning: DocumentRoot [/usr/local/apache/var/www/<my_django_project>] does not exist
AH00112: Warning: DocumentRoot [/usr/local/apache/var/www/<my_django_project>] does not exist
AH00112: Warning: DocumentRoot [/usr/local/apache/var/www/<my_django_project>] does not exist

我從未指定/usr/local/apache/var/www/<my_django_project> ???

似乎只是將我的var/www/<my_django_project>附加到/usr/local/apache ...不知道為什么

我的httpd.conf文件:

... a bunch of pre configured goDaddy stuff I'm guessing here ...


LoadModule wsgi_module /usr/local/apache/extramodules/mod_wsgi.so
AddHandler wsgi-script .wsgi

<VirtualHost XXX.XXX.XXX.X:80>

ServerName XXX.XXX.XXX.XXX
ErrorLog /var/log/httpd/error.log
# DocumentRoot /public_html/
ServerAdmin admin-noreply@mysite.com

Alias /favicon.ico /var/www/<my_django_project>/static/favicon.ico

Alias /static /var/www/<my_django_project>/static
<Directory /var/www/<my_django_project>/static>
        Require all granted
</Directory>

Alias /media /var/www/<my_django_project>/media
<Directory /var/www/<my_django_project>/media>
        Require all granted
</Directory>

WSGIDaemonProcess <my_django_project> python-path= /var/www/<my_django_project>:/var/www/<my_django_project>/<my_django_project>:/var/www/<my_django_project>/<my_django_project_site>:/usr/local/lib/python2.7/site-packages
WSGIProcessGroup <my_django_project>
WSGIScriptAlias / /var/www/<my_django_project>/<my_django_project>/wsgi.py

<Directory /var/www/<my_django_project>/<my_django_project>>
    <Files wsgi.py>
        Require all granted
    </Files>
</Directory>

</VirtualHost>

... more stuff already in the conf file ...

當我在互聯網瀏覽器中轉到XXX-XXX-XXX-XXX:80 ,它告訴我找不到.htaccess文件。 但是現在它只是將我重定向到http://XXX.XXX.XXX.XXX/cgi-sys/defaultwebpage.cgi

任何幫助將非常感激

編輯:

有人指出AH00112: Warning: DocumentRoot [/usr/local/apache/var/www/<my_django_project>] does not exist是由於未在路徑前面添加/

我的瀏覽器現在給我:

Forbidden

You don't have permission to access / on this server.
Server unable to read htaccess file, denying access to be safe

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

這表明您已將Apache配置文件中某處的DocumentRoot指令設置為沒有斜杠的路徑。 發生這種情況時,Apache會將路徑附加到ServerRoot目錄的末尾,在您的情況下為/usr/local/apache 確保您設置的所有文件系統路徑都是帶斜杠的絕對路徑名。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM