如何防止每次添加域时cpanel正常重启

我想添加300-400添加和通配符子域。

每次我添加一个添加域时,cpanel都会正常重启。

结果是整个服务器停机 5-10分钟。

如果我做到了:

tail -f /usr/local/apache/logs/error_log [Sun Dec 30 23:11:18 2012] [notice] Graceful restart requested, doing restart [Sun Dec 30 23:18:01 2012] [notice] SSL FIPS mode disabled [Sun Dec 30 23:18:01 2012] [notice] Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 configured -- resuming normal operations 

如果我做:

 tail -f /usr/local/cpanel/logs/error_log [2012-12-30 23:11:17 -0600] info [parkadmin] Creating Addon domain 'massadult.com' on 'massadult.freemarketforever.com'. [2012-12-30 23:11:23 -0600] info [parkadmin] 'local' datastore in use (/var/cpanel/conf/apache/local) /usr/local/cpanel/bin/ftpadmin : Syncing Ftp Databases.... [2012-12-30 23:13:42 -0600] info [cpmysqladmin] Creating MySQL database freemark_massadult for user freemark 

有时[2012-12-30 22:37:36 -0600] info [ensure_vhost_includes] 'local' datastore in use (/var/cpanel/conf/apache/local)出现在cpanel error_log中,这可能是为什么花了这么长时间才能正常重启httpd

所以基本上我想添加吨的域添加,然后做一次Apache重启。 我听说我们可以稍微修改脚本以防止发生这种情况。 但是哪个脚本怎么样?

请注意,任何时候cPanel都会对Apacheconfiguration进行更新。 这与完整的Apache重新启动不一样。 在平稳重启之后, /usr/local/apache/bin/apachectl status报告的正常运行时间保持不变。 平稳的重新启动实际上是重新加载configuration值,而不应该影响您的网站的function。

在你的情况下,优雅的重启需要很长时间,这意味着你的cPanel服务器一定有问题,在这种情况下,你需要联系你的服务器pipe理员,并重新检查问题完全。 另外如果你想要你可以在cPanel支持票中打开票 。

添加域 cpanel后在内部调用/ scripts / restartsrv_apache。 如果你看到它调用到/ usr / local / cpanel / scripts / restartsrv_httpd脚本的源代码。

在该脚本中,查看源代码,可以看到有趣的文件标志,用于禁用apache重新启动,如:

  • 在/ etc / httpddisable
  • 在/ etc / apachedisable
  • 在/ etc / httpdisable
  • 在/ var /的cPanel / mgmt_queue / apache_update_no_restart

这最后一个标志是在cPanel EasyApache文档logging不佳 。

禁用它应该有助于减轻每次添加域时重启/优雅apache的影响。 记住重新启动Apache时,再次启用该标志,因为直到Apache将重新启动它不会注意到新的域名参加请求。