So lack of apr-1-config/apu-1-config means that whoever has packaged Apache for
the Synology NAS hasn't included the bits which would allow you to build third
party Apache modules.
The better approach as I mentioned is to look at the docker service that you
can install from the Synology package centre.
You then just need to create a docker image for your application and deploy it.
You could learn about docker and write your own instructions from scratch for
creating a docker image, or you could use the Source-to-Image (S2I) package to
do it and make your life much easier.
The S2I tool is available at:
https://github.com/openshift/source-to-image
<https://github.com/openshift/source-to-image>
With it installed creating a docker image can be as simple as running:
s2i build . centos/python-35-centos7 blog
That is, take the application source code in the current directory, run it
through the S2I builder centos/python-35-centos7 and out pops a docker image
called 'blog'.
For this to work, the only thing I need to add to my application source code is
an execute app.sh script which says how to start the web application. For
example with something like:
#!/bin/bash
PORT=${PORT:-8080}
ARGS=""
ARGS="$ARGS --log-to-terminal"
ARGS="$ARGS --port $PORT"
ARGS="$ARGS --document-root htdocs"
ARGS="$ARGS --url-alias /media media"
exec python manage.py runmodwsgi $ARGS
In this case I have relied on having installed mod_wsgi from the
requirements.txt file and set up Django to integrate with mod_wsgi in settings
file.
http://blog.dscpl.com.au/2015/04/integrating-modwsgi-express-as-django.html
<http://blog.dscpl.com.au/2015/04/integrating-modwsgi-express-as-django.html>
http://blog.dscpl.com.au/2015/04/using-modwsgi-express-with-django.html
<http://blog.dscpl.com.au/2015/04/using-modwsgi-express-with-django.html>
I have not had to worry about creating a Dockerfile saying how to build the
image as the S2I tool and builder worries about it all.
Once you have this docker image you could run it on your local docker service
to test it. You could then upload it to an image registry and pull it from that
back into your docker service on the Synology NAS and run it, or work out what
the docker service on the NAS wants when you say to upload an image via URL or
from a file, and perhaps load it into the NAS directory from your local machine
and avoid using an image registry.
So that is the general suggestion based on fact that getting mod_wsgi
integrated with the Synology NAS own Apache may not be trivial.
Graham
> On 29 Nov 2017, at 8:22 am, [email protected] wrote:
>
> Hi,
>
> Following on from a GitHub Issue that I raised and subsquent conversation
> with the ever helpful Graham I'm here to look for help getting Django up and
> running on our Synology box.
>
> Currently my attempt to build (./configure) mod_wsgi from source results in:
>
> checking for apxs2... no
>
> checking for apxs... /opt/sbin/apxs
>
> apxs:Error: /home/slug/optware/syno-i686/staging/opt/bin/apr-1-config not
> found!.
>
> apxs:Error: /home/slug/optware/syno-i686/staging/opt/bin/apr-1-config not
> found!.
>
> checking for gcc... gcc
>
> checking whether the C compiler works... no
>
> configure: error: in `/var/services/homes/daviesc/MODWSGI/mod_wsgi-develop':
>
> configure: error: C compiler cannot create executables
>
> See `config.log' for more details
>
>
>
>
> find / -name apr-1-config
> find / -name apu-1-config
>
> returns null.
>
> I'm currently working on getting the C Compiler happening but Graham has
> suggested using the Docker service.
>
> Regards
>
> Chris
>
> --
> You received this message because you are subscribed to the Google Groups
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/modwsgi
> <https://groups.google.com/group/modwsgi>.
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.