Deploy Adagios web application

49 views
Skip to first unread message

Adriaan Wilmink

unread,
Feb 16, 2016, 1:03:20 PM2/16/16
to Django users
I setup Nagios Core in a Centos 6.4 VM. 

To create ease of configuration, I am busy setting up a module called Adagios.

This module creates a web interface to create, edit and remove Nagios objects.

the module has Django as a prerequisite. Because Centos 6.4 automatically prefers Python 2.6, even after setting up a virtual environment

and I currently have not been able to get pip to accept python3 as default (even when using pip 3.5), I am provisionally using Django 1.6.

I know this has security implications, but for the time being my goal is to see a working setup.

The setup is in fact working, but only from localhost.


I startup Adagios by running an executable ./manage.py runserver.

After looking up manage.py I learned that this is normal behaviour that it will only recognise 12.0.0.1:8000 to display the website.

If I'm correct, I need to deploy the Django web application in order to make it reachable from other hosts on the local network.

I tried following the 1.6 tutorial on the official Django website with no luck.

I will add my httpd.conf file.

WSGIScriptAlias / /opt/adagios/adagios/wsgi.py
WSGIPythonPath /opt/adagios/
WSGIDaemonProcess 10.149.21.79 python-path=/opt/adagios/
WSGIProcessGroup 10.149.21.79


<Directory /opt/adagios/adagios>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</
Directory>



Also I can see that wsgi_mod is loaded when I run httpd -t -D DUMP_MODULES. I saw in another similair post in this forum that might be important.


I did not create the Django project, I just built it from source, as I built Adagios and it's other components.

I followed the literal steps, so I'm fairly sure it is configured correctly. The Adagios installation tutorial does not mention any specific steps how to deploy the web application.


Can anyone give any specific or general hints how to proceed? Thanks in advance!


Adriaan Wilmink

unread,
Feb 16, 2016, 1:25:12 PM2/16/16
to Django users


Op dinsdag 16 februari 2016 14:03:20 UTC+1 schreef Adriaan Wilmink:
I setup Nagios Core in a Centos 6.4 VM. 

updated httpd.conf file:

WSGIScriptAlias / /opt/adagios/adagios/wsgi.py
WSGIPythonPath /opt/adagios/
WSGIDaemonProcess 10.149.21.79 python-path=/opt/adagios:/usr/lib64/python2.6/site-packages

WSGIProcessGroup 10.149.21.79


<Directory /opt/adagios/adagios>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</
Directory>


Regardless of adding the actual python path, or when I leave out daemonizing Django, I get a website error.

If I use port number 8000 I get the error connection refused, if I use default port 80 I get a service temporarily unavailable error.

 

Luis Zárate

unread,
Feb 17, 2016, 4:10:52 AM2/17/16
to django...@googlegroups.com
I don't know where is your problem, and I deployed django with apache time ago, but if I remember well WSGIDaemonProcess is not a IP, It is the user of process that run wsgi so I used like

WSGIDaemonProcess myuser
WSGIDaemonGroup myusergroup

I sorry if I am not in the truth.
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3fe21c11-2225-4eff-bcf9-e634fc032973%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

--
"La utopía sirve para caminar" Fernando Birri



Reply all
Reply to author
Forward
0 new messages