Graphite+Apache2+mod-wsgi, 404 error in webpage

Asked by weihua

Hi,All
   I launch my graphite-web server by following step

1. install all pre-requirement packages
2. start apache2 server, it is ok
3. start carbon cache
4. start graphite server by:
   PYTHONPATH=`pwd`/storage/whisper sudo ./bin/run-graphite-devel-server.py --port=8086 --libs=`pwd`/webapp /opt/graphite 1

    PYTHONPATH=`pwd`/storage/whisper sudo ./bin/run-graphite-devel-server.py --port=8086 --libs=`pwd`/webapp /opt/graphite 1
[sudo] password for weiliang:
Adding /opt/graphite/webapp to your PYTHONPATH
Running Graphite from /opt/graphite under django development server

/usr/bin/django-admin runserver --pythonpath /opt/graphite/webapp --settings graphite.settings 0.0.0.0:8086
Validating models...

0 errors found
November 19, 2015 - 16:44:22
Django version 1.6.4, using settings 'graphite.settings'
Starting development server at http://0.0.0.0:8086/
Quit the server with CONTROL-C.

5. Then I try to access <myhostip>:8086 url, but following error is found on webpage

                 Not Found

                 The requested URL / was not found on this server.

     And an error is reported on terminal : [19/Nov/2015 16:56:15] "GET / HTTP/1.1" 404 74

Anyone has idea on it?

Question information

Language:
English Edit question
Status:
Solved
For:
Graphite Edit question
Assignee:
No assignee Edit question
Solved by:
weihua
Solved:
Last query:
Last reply:
Revision history for this message
weihua (weihua-liang) said :
#1

The problem is solved,

In my /etc/apache2/sites-available/graphite-vhost.conf, I set WSGIScriptAlias like, have no URL_PREFIX

WSGIScriptAlias / /opt/graphite/conf/graphite.wsgi

But in local_settings.py, I did not comment URL_PREFIX='/graphite'

So the error occured.

Revision history for this message
Denis Zhdanov (deniszhdanov) said :
#2

Cool. Just want to add that you don't need to run devserver and Apache - Apache only is enough.