一部のユーザーから、サーバーのデフォルトの2082/2083cPanelポートを変更できるかどうか尋ねられました。インターネットを検索している場合は、次のことを推奨する多くのWebページ/記事が表示されます。
- rootとしてSSH経由でサーバーにログインします
- ファイルを編集します/var/cpanel/cpanel.config お好みのテキストエディタで。
- 行を検索
port =2082
そして、2082を目的のポートに置き換えます。 - service cpanelrestartを使用してcPanelサービスを再起動します
この方法は機能しなくなったことに注意してください。この記事の執筆時点(2017年6月)では、デフォルトのcPanel(およびWHM)ポートを変更する方法はありません!
port =xxxxという行を手動で追加しようとしています /var/cpanel/cpanel.configの行 cPanelログファイル/usr / local / cpanel / logs / error_logに警告が表示されます :
[2017-06-26 15:56:20 -0400] warn [restartsrv_cpsrvd] One or more key settings for "webcp.plothost.com" were either not found in cPanel & WHM’s server configuration file (/var/cpanel/cpanel.config), or were present but did not pass validation.
[2017-06-26 15:56:20 -0400] warn [restartsrv_cpsrvd] The following settings are obsolete and have been removed from the server configuration file:
[2017-06-26 15:56:20 -0400] warn [restartsrv_cpsrvd] port
[2017-06-26 15:56:20 -0400] warn [restartsrv_cpsrvd] Read the cpanel.config file documentation (https://go.cpanel.net/cpconfig) for important information about this file.