【问题标题】:How to change cpanel default port?如何更改cpanel默认端口?
【发布时间】:2011-10-19 04:54:49
【问题描述】:

我有一台服务器,在该服务器上,cpanel 在 2083 端口上运行。我需要这个 url 来配置我的其他服务。我想将端口 2083 更改为 8088。我必须在哪里进行更改。 我检查了我的 httpd.conf,因为他们写了

RewriteCond %{HTTP_HOST} ^cpanel\.
RewriteCond %{HTTPS} on
RewriteRule ^/(.*) https://127.0.0.1:2083/$1 [P]

那么我需要在这个文件中做些什么来改变 cpanel。

我检查了 cpanel/APACHE_CONFIG 但没有得到任何提示。

【问题讨论】:

    标签: linux apache cpanel


    【解决方案1】:

    在 cpanel.config 中更改端口号对我不起作用

    所以我使用了内部端口重定向,即将端口 8088 上的所有流量在内部路由到端口 2083。

    iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 8088 -j REDIRECT --to-port 2083
    

    【讨论】:

      【解决方案2】:

      您可以在 /var/cpanel/cpanel.config 中修改文件

      你可以找到这个值:

      port=2082

      我相信这是可以更改的默认 cPanel 端口。

      【讨论】:

      • 让'那是工作'做/usr/local/cpanel/whostmgr/bin/whostmgr2 --updatetweaksettings/etc/init.d/httpd restart
      【解决方案3】:
      You can change the cPanel port in /var/cpanel/cpanel.config file. Search for this line
      --------------------
      port=2082
      ----------------------
      After changing the port, then run these two commands for it to take effect:
      
      # /usr/local/cpanel/whostmgr/bin/whostmgr2 --updatetweaksettings
      # /etc/init.d/httpd restart
      

      通过:http://linuxworldweb.blogspot.co.uk/2012/01/how-to-change-cpanel-port.html

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2015-05-24
        • 2016-11-02
        • 1970-01-01
        • 2019-09-08
        • 2021-09-03
        • 1970-01-01
        • 2011-10-31
        • 2013-11-30
        相关资源
        最近更新 更多