python - Django website on Apache with wsgi failing -


so i'm lunch first django website , have server has been configured host php websites , i've decided test simple empty project familiar process

so python version in server bit old (2.6) couldn't install latest version of django , installed 1.6 , since it's test that's not important (im going upgrade python version when website ready lunch )

so i've installed django , created new project called testing in dire

/home/sdfds34fre/public_html/ 

which can see using domain

http://novadmin20.com

and after reading documentation on django (unfortunately have removed doc 1.6 , had use 1.9) , wsgi i've updated httpd.conf

<virtualhost 111.111.111.111:80>     servername 111.111.111.111     documentroot /usr/local/apache/htdocs     serveradmin somemeail@gmail.com     <ifmodule mod_suphp.c>         suphp_usergroup nobody nobody     </ifmodule>      <directory /home/sdfds34fre/public_html/testing/testing>         <files wsgi.py>             require granted         </files>     </directory>       wsgidaemonprocess testing python-path=/home/sdfds34fre/public_html/testing:/usr/lib64/python2.6/site-packages/     wsgiprocessgroup testing     wsgiscriptalias / /home/sdfds34fre/public_html/testing/testing/wsgi.py   </virtualhost> 

but after restarting httpd service when go

http://novadmin20.com/testing/ 

all see directory list , missing ?

here wsgi.py file

""" wsgi config testing project.  exposes wsgi callable module-level variable named ``application``.  more information on file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """  import os import sys  sys.path.append(os.path.dirname(os.path.dirname(__file__))) os.environ.setdefault("django_settings_module", "testing.settings")  django.core.wsgi import get_wsgi_application application = get_wsgi_application() 

documentroot directive main root of problem. (ref)

try config:

<virtualhost 111.111.111.111*:80>  servername novadmin20.com   wsgidaemonprocess testing python-path=/home/sdfds34fre/public_html/testing:/usr/lib64/python2.6/site-packages/  wsgiscriptalias / /home/sdfds34fre/public_html/testing/testing/wsgi.py    <directory /home/sdfds34fre/public_html/testing/testing>      <files wsgi.py>       order deny,allow       require granted       wsgiprocessgroup testing     </files>    </directory>  </virtualhost> 

Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -