From Sysvm VEPH : VPS Control Panel

Jump to: navigation, search


About DirectAdminNginx

DANginx is an Nginx integration plugin for direct admin server for increasing server speed , performance and protection. This plugin is fully automated. There is no need to edit/add any settings unless you need big customization.


You may need a Linux server for running DAnginx server. Your server php need ioncube loader for its working.

  • Operating System : RHEL/Centos , Debian/Ubuntu
  • Control Panel : Direct Admin
  • Apache version 2 or later
  • PHP version 5 or later with Ioncube loader and curl
  • Suhosin disabled
  • safe_mod= Off
  • Ioncube Load enabled

The above changes are only required for installation time. You can revert the php.ini changes after the installation.

Install Direct Admin Nginx

Download the latest danginx from . The file will be in a gtar format with a name like danginx.X.Y.tar.gz , where X.Y is the version . Now upload this to your server and install it as follows

 #  tar -xzf danginx.X.Y
 # cd danginx/
 # sh

Uninstall DANginx

To remove the Direct Admin Nginx Plugin execute the script as follows,

 # sh /etc/danginx/ 

Manual Rebuild of Nginx vhost configuration

To manually rebuild the nginx vhost configuration execute the scrip /usr/local/directadmin/scripts/rebuildnginxvhost

How to restart Nginx Server

To restart nginx server use the command /etc/init.d/nginx restart

Technical Support

Please consider opening a support request from

Add custom file extensions to Nginx server

To add a custom static file extension to nginx server edit the file /etc/danginx/fileextensions.txt then rebuild nginx vhost and restart it

How to disable/enable nginx temperately

To disable nginx run the script /usr/local/directadmin/scripts/disablenginx .This will disable nginx server and switch apache to port 80 To enable a disabled nginx server run the script /usr/local/directadmin/scripts/enablenginx , this will enable nginx on port 80

Direct Push

This option will allow some domains/subdomain to directly pass to apache via nginx. So nginx won't server any static files of that domain . To manage direct push use the command /usr/local/directadmin/scripts/directpush

  • eg : To add a domain to direct push use /usr/local/directadmin/scripts/directpush add
  • eg: To remove a domain from direct push use /usr/local/directadmin/scripts/directpush del
  • eg : To list all direct pushed domains use /usr/local/directadmin/scripts/directpush list

How to customize vhost configuration

To customize nginx vhost configuration edit the file /etc/danginx/vhost.conf then rebuild vhost and restart it.

How to change License Key

If you need to change license key of this plugin , please edit the file /etc/danginx/data.conf and update the new license key like LICENSE:nginxnewlice

How to set Custom expire time ( New feature from version 3.0 )

You can add custom expire time for domain/subdomain as follows, See and example below. You may need to rebuild nginx vhost and restart it.

echo "30d" > /etc/danginx/expires/  

How to include custom configuration file for a domain ( New feature from version 3.0 )

You may need to place the custom include file in /etc/danginx/custom/ . Then rebuild nginx vhost and restart . The syntax of custom include file must be /etc/danginx/custom/ .

Personal tools
End user manual