QNAP QTS Configuration and Executable Files

One of my problems on QNAP QTS is to find files. Therefore, I will maintain and update this list regularly.



apache.conf /etc/config/apache/apache.conf
apc.ini /etc/config/apc.ini
my.cnf /etc/config/my.cnf
php.ini /mnt/HDA_ROOT/.config/php.ini
php.ini (default) /etc/default_config/php.ini
php.ini (if you install from ipkg) /opt/etc/php.ini
php_config.h /opt/include/php/main/php_config.h

Enable Nginx 1.6 + PHP 5.5.12 FastCGI QPKG

nginx.conf /share/CACHEDEV1_DATA/.qpkg/Nginx/nginx/conf/nginx.conf



apache /usr/local/apache/bin/apache
* Fail to start or stop apache directly without /sbin/daemon_mgr. Need to use Qthttpd.sh
ipkg /opt/bin/ipkg
ipkg install [package name]
ipkg remove [package name]
mysql shell
/etc/init.d/mysqld.sh restart
php cli
Qthttpd.sh /etc/init.d/Qthttpd.sh

Enable Nginx 1.6 + PHP 5.5.12 FastCGI QPKG

Nginx /share/CACHEDEV1_DATA/.qpkg/Nginx/nginx/sbin/nginx -s {stop | quit | reopen | reload}
Nginx.sh /share/CACHEDEV1_DATA/.qpkg/Nginx/Nginx.sh {start | stop | restart}
php cli

Log Files


apache error /usr/local/apache/logs/error_log
* Need to manually enable by first creating /etc/config/apache/extra/apache-myconfig.conf with following configurations:

CustomLog logs/main_log combined
ErrorLog logs/error_log

Then modify /etc/config/apache/apache.conf to include this configuration file:

Include /etc/config/apache/extra/apache-myconfig.conf

Enable Nginx 1.6 + PHP 5.5.12 FastCGI QPKG

Nginx error /share/CACHEDEV1_DATA/.qpkg/Nginx/nginx/logs/error_log

Other Files


apache modules /usr/local/apache/modules
session files /share/CACHEDEV1_DATA/.php_session
web pages /share/Web
Owner: admin

Enable Nginx 1.6 + PHP 5.5.12 FastCGI QPKG

apache modules /usr/local/apache/modules
session files /share/CACHEDEV1_DATA/.php_session ?
web pages /home/Qhttpd/Web
Owner: admin


  1. When use ssh to login, use ssh admin@[IP]. admin is the root.


  1. QNAP: QTS
  2. QNAP: Forum: strange problem in Apache error_log
  3. QNAP: Forum: MySQL Start – Stop problem

8 thoughts on “QNAP QTS Configuration and Executable Files

    • Dear Frey,

      If the /etc/config/my.cnf is the real in use, where is it? ls -l /etc/my.cnf shows links to /etc/config/my.cnf

      When modify my.cnf, I will also take a look at /etc/init.d/mysqld.sh because QTS will protect some configuration in my.cnf using mysqld.sh. You need to edit mysqld.sh to change the value.

      It is the same to /etc/config/apache/apache.conf with Qthttpd.sh

      Have a nice day!

      Best regards,



  1. Just wanted to say thanks for putting your notes online! Do you have an Intel or ARM-based QNAP? I’m running 4.1.3 on a QNAP TS-451

    Liked by 1 person

    • Dear Mr. Tseng,

      Yes, I do have a QNAP TS-119PII (running Time Machine service for my Mac Mini. It has a Marvell 88F6281 at 2.0GHz which is ARM-based model.

      QNAP kindly lend me a TS-251 and a TS-253 for testing. They are both based on Intel Bay Trail technology. I expect to return them to QNAP next month.

      I have upgrade my TS-119PII to 4.1.3 earlier this month (2015/3).

      Have a nice day!

      Best regards,



  2. Hi Amigo,

    This has to be the best site with the QNAP info. Just to bad I only found it after also spending hours finding stuff. I do have a problem or question. We are using Mercurial. I got it installed and setup. Most things work. But again with the configuration I have a problem. I need to enable a system-wide extension for Mercurial (largefiles extension) but I cannot figure out where this configuration file should live. Placing one in the root worked, but only for the admin user.

    Can you recommend a directory I can try to put this hgrc (config) file so that Mercurial will use it for the system and not just a user. I have looked at all the possible directories Mercurial itself will scan. But none works for this. I used opkg to install Mercurial. I also used the tutorial on the QNAP Forum to install and configure Mercurial. But no-one seems to be able to help me with the setup or configuration of the extensions.

    Kind regards,


    • Hi,

      I never use it but think it’s about Linux user permission. Try to set a group permission to run Mercurial and the configuration but it’s less secure.

      If you could run Virtualization Station, I recommend Revision Control – All-in-one code repository. With a VM, you have more flexibility and better performance than QTS.

      Wish it helps!


  3. Hi,
    I’m trying to install Kodi to run with MySql on my internal network. I’ve done everything by the books and Kodi is up and running. When I try to add Movies/Series Kodi cannot access MysQL and initialize/open the database. I am thinking there are problems with the bind-address and would like to check/correct this.
    How can I access files like /etc/my.cnf or /etc/mysql/my.cnf?
    Could you please point me in the right direction?
    Thank you very much
    Dr. C. Goetz


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.