SSI ((Server Side Includes) and web server Qnap

Post your questions about Web Server usage and Apache + PHP + MySQL/SQLite web applications.
drons
New here
Posts: 7
Joined: Sat Sep 02, 2017 12:53 am

SSI ((Server Side Includes) and web server Qnap

Postby drons » Sat Sep 02, 2017 1:10 am

Hi
I'm transferring my site to Qnap from another NAS (Synology), and it needs the support of SSI. But SSI does not work in web server Qnap. Please help me if you know the solution.
Regards

dolbyman
Ask me anything
Posts: 6191
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: SSI ((Server Side Includes) and web server Qnap

Postby dolbyman » Sat Sep 02, 2017 4:15 am

run a vm or container with full web package

drons
New here
Posts: 7
Joined: Sat Sep 02, 2017 12:53 am

Re: SSI ((Server Side Includes) and web server Qnap

Postby drons » Mon Sep 04, 2017 4:25 am

I already thought about container, but unfortunately my knowledge is not enough yet, to configure this service. Where can I read about setting up a web server in a container?

drons
New here
Posts: 7
Joined: Sat Sep 02, 2017 12:53 am

Re: SSI ((Server Side Includes) and web server Qnap

Postby drons » Tue Sep 26, 2017 3:39 am

The problem with SSI (Server Side Includes) in QTS 4.3.3 is that the apache server does not load the standard module mod_include.so
If you added the module yourself to /mnt/HDA_ROOT/.config/apache/extra/apache-default-modules.conf, this worked only until the web server or NAS was rebooted.
My son helped me to add the necessary module using autorun.sh. He wrote an excellent instruction for me. But I think it can be useful to someone else.

1. Create a directory and script to test and add the desired module to the config
1.1

Code: Select all

mkdir /share/<path_to_some_persistent_directory>

where instead of <path_to_some_persistent_directory> you use the path that you chose yourself

1.2

Code: Select all

vim /share/<path_to_some_persistent_directory>/add_ssi_module.sh

Code: Select all

===========================================================
#!/bin/bash

if [ -z $(grep -o mod_include.so /etc/default_config/apache-default-modules.conf)]
        then echo "LoadModule include_module modules/mod_include.so" >> /etc/default_config/apache-default-modules.conf
        /etc/init.d/Qthttpd.sh restart
                else
        exit 1
fi
===========================================================

1.3

Code: Select all

chmod +x /share/<path_to_some_persistent_directory>/add_ssi_module.sh


2. Editing an autorun file
2.1

Code: Select all

mount $(/sbin/hal_app --get_boot_pd port_id=0)6 /tmp/config

2.2

Code: Select all

vim /tmp/config/autorun.sh

Code: Select all

===========================================================
#!/bin/sh

/bin/bash /share/<path_to_some_persistent_directory>/add_ssi_module.sh
===========================================================

2.3

Code: Select all

chmod +x /tmp/config/autorun.sh


Return to “Web Server & Applications (Apache + PHP + MySQL / SQLite)”

Who is online

Users browsing this forum: No registered users and 4 guests