• Thank you very much for the article. Could you please post an article to install Django with Apache on OpenSUSE?

    Thanks, Rashmi

  • Hi there, thank you for really nice tutorial. It is clear everything but i found some problems which I don't know how to solve. I tried to configure server that I can visit webiste directly with IP address or host name without port number as said.

    I added this conf file and i corrected all paths: "/opt/djangoproject/static" to "django/project/static" etc.

    Alias /static /opt/djangoproject/static <br> <Directory /opt/djangoproject/static> <br> Require all granted <br> </Directory><br> <br> <Directory /opt/djangoproject/myfirstproject><br> <Files wsgi.py><br> Require all granted<br> </Files><br> </Directory><br> <br> WSGIDaemonProcess myfirstproject python-path=/opt/djangoproject:/opt/djangoproject/djangoprojectenv/lib/python2.7/site-packages<br> WSGIProcessGroup myfirstproject<br> WSGIScriptAlias / /opt/djangoproject/myfirstproject/wsgi.py

    httpd was restarted, port is allowed and ownership is also set, but nothing happens when i visit vps url as mentioned.

    Any idea what i did wrong?

    ps. my directory /django/ is in root. <br> root<br> - django<br> - ...<br> - etc<br> - ....<br>

  • I am having the same issue as the above poster kregg. If there is a fix or another way to get things working correctly please respond.

  • Hello D1000 and krregg,

    I would check the output of the command firewall-cmd --list-ports, it is possible that you don't actually have port 80 listening. The tutorial said to run firewall-cmd --zone=public --permanent --add-port=80/tcp which will add port 80 to the list, but it doesn't happen until firewalld is restarted. You can run the command without --permanent to have it apply immediately.

    firewall-cmd --zone=public --add-port=80/tcp
    

    Another item that could cause issues is your SELinux settings. If sestatus is showing enforcing, then you will probably get an error when trying to log into the django admin because Apache doesn't have write access to a directory it is trying to access. The correct way to fix this would be to adjust the security context. For the purposes of the tutorial, you can temporarily get around it by running 'setenforce 0'.

    Eric

Log In, Add a Comment