Apache to support Python

Questions about HTTP Access/Mods may go here
Forum rules
1) This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form:


2) To avoid putting users' DiskStation at risk, please don't paste links to any patches provided by our Support team as we will systematically remove them. Our Support team will provide the correct patch for your DiskStation model.
I'm New!
I'm New!
Posts: 1
Joined: Sun Feb 26, 2017 10:58 am

Apache to support Python

Postby archerv » Sun Feb 26, 2017 11:24 am

Hi Guys,

Requesting for Python to be added in the Apache. I believe python 2.7 is already installed in the DSM6 and yet the Apache does not support this.
I tried to do it myself but a lot of challenges that I am not sure if this is possible or might just make things worst in my NAS setup.

This is my attempt:

1. I download the mod_wsgi-4.5.14 then
2. extract using "tar xzf mod_wsgi-4.5.14.tar.gz"
3. Inside the extracted folder, install it "sudo python setup.py install"
4. At first the error is "setuptools" is not installed. I fixed it by installing "setuptools" manually.
5. Next error is " 'missing Apache httpd server packages.' % APXS)"

I have no idea how to do this as APXS should normally be part of Apache package and even If this work, still not so sure if there are other more errors to encounter.

I hope that the synology team will be able to have a package that allows Apache to understand Python.

Posts: 29
Joined: Sun Nov 29, 2015 2:57 pm

Re: Apache to support Python

Postby afawaz » Wed May 03, 2017 6:57 pm

Hi am also searching for a way to install mod_wsgi !
I did not figure out for now how to do it !
I tried to use ipkg ( ipkg install mod_wsgi ) it succeed but apache is not able load it :

in httpd-user.conf :

Code: Select all

LoadModule wsgi_module /opt/libexec/mod_wsgi.so

>> lead to this error

Code: Select all

httpd22: Syntax error on line 141 of /usr/local/etc/apache22/conf/httpd22.conf: Syntax error on line 2 of /usr/local/etc/apache22/sites-enabled/httpd-user.conf: Cannot load /opt/libexec/mod_wsgi.so into server: /opt/libexec/mod_wsgi.so: wrong ELF class: ELFCLASS32

any idea ?

Return to “HTTP/Apache Mods”

Who is online

Users browsing this forum: No registered users and 1 guest