Installing Nginx

From ISPWiki

Jump to: navigation, search

Note! Before installing Nginx, make sure you have backed up the Apache configuration file

If sites with FastCGI support do not open upon Nginx restart

Perhaps, FastCGIб for example, it was compiled into Apachewasб rather than installed through the control panel. Add the following into the ISPmanager configuration file(/usr/local/ispmgr/etc/ispmgr.conf)

Option ForcePhpFastCgi

Once you are done, in the "WWW domains" module open the required WWW domain and select the check box other than "PHP as FastCGI". Click Ok to apply the changes. Open the form again and select the correct value that will be specified in the Apache configuration file.

If all the domains disappeared from the "WWW domains" module upon Nginx installation

While installing Nginx, the control panel generates nginx.conf from the Apache configuration file.

  • Creates a backup copy of metadata about virtualhists in /url/local/ispmgr/var/wwwdomain.backup
  • Creates a backup copy of the Apache configuration file in /ibackup
  • Clears all the Apache configuration files.
  • Installs Nginx.
  • Recovers the virtualhosts using the metadata that was backed up earlier.
  • Restarts web-servers.

If all WWW domain disappeared, make sure www domains are specified in the Apache and Ngnx configuration files.

If Apache configuration file is currapted, and the domain that was created earlier is not specified there.

First of all, check the version of your ISPmanager. The out-dated version is the cause of that error.

  • Restore the Apache configuration file from the backup copy.
  • Restart Apache
apachectl restart
  • Make sure the www-domains now display on the list.
  • Update the control panel to the current version.
  • Execute
/usr/local/ispmgr/sbin/pkgctl cache
  • Back up the Apache configuration file in case new WWW domains were added after the last backup
  • Install Nginx in the "Applications" module.


If the latest version of the control panel is used, and the Apache configuration file is empty. Or the nginx.conf configuration file is empty. This means that the control panel detected errors in the Apache configuration file.

  • Add the following into the ISPmanager configuration file (/usr/local/ispmgr/etc/ispmgr.conf)
LogLevel 9
  • also
echo "9" >> /usr/local/ispmgr/etc/pkgctl.debug
  • Restart the panel
killall ispmgr
  • Back up the Apache configuration file in case new WWW domains were added after the last backup.
  • Install Nginx from the Applications module.
  • View /usr/local/ispmgr/var/ispmgr.log for the information about the Apache configuration file. There you can also see when and why generation was terminated.

The domain is not present in the WWW domains module, the ispmgr.log logs contains the following information - WARNING vhost 'domain.ru' not found in main config.

  • Make sure you have specified a correct owner of the WWW domain in the Apache configuration file. The owner is specified with SuexecUserGroup or AssignUserID (if Apache runs in MPM mode).
  • The most common cause of this error is invalid path to the home directory. In the Apache configuration file - DocumentRoot, in the Nginx configuration file it is normally set $root_path . Make sure those paths coincide and refer to the valid directory.
  • Check home directory permissions.
Was this helpful? Yes | No
Views
Personal tools