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
SSI ((Server Side Includes) and web server Qnap
-
- Starting out
- Posts: 10
- Joined: Sat Sep 02, 2017 12:53 am
- dolbyman
- Guru
- Posts: 35273
- Joined: Sat Feb 12, 2011 2:11 am
- Location: Vancouver BC , Canada
Re: SSI ((Server Side Includes) and web server Qnap
run a vm or container with full web package
-
- Starting out
- Posts: 10
- Joined: Sat Sep 02, 2017 12:53 am
Re: SSI ((Server Side Includes) and web server Qnap
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?
-
- Starting out
- Posts: 10
- Joined: Sat Sep 02, 2017 12:53 am
Re: SSI ((Server Side Includes) and web server Qnap
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
where instead of <path_to_some_persistent_directory> you use the path that you chose yourself
1.2
1.3
2. Editing an autorun file
2.1
2.2
2.3
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>
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
===========================================================
Code: Select all
chmod +x /share/<path_to_some_persistent_directory>/add_ssi_module.sh
2.1
Code: Select all
mount $(/sbin/hal_app --get_boot_pd port_id=0)6 /tmp/config
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
===========================================================
Code: Select all
chmod +x /tmp/config/autorun.sh
-
- Know my way around
- Posts: 101
- Joined: Thu Jul 25, 2013 1:25 am
Re: SSI ((Server Side Includes) and web server Qnap
THANK YOU for sharing this
[ TS-873U-RP @HQ ][ TS-220 + TS-221 +TS-419 U II @Satellite branches ] [ TS-212P + HS453-DX @Home ]