Navigation

    • Register
    • Login
    • Search
    • Recent
    • Users
    • Groups

    NGINX Reverse Proxy - conflicting server name

    CWP - Panel
    2
    7
    93
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      Galactus last edited by

      Hello Guys,

      Can anyone please lead me in the direction of resolving this minor issue I have or have caused with CWP 7?

      I have one hosted test domain running wordpress that occasionally gets redirect timeouts so maybe because of this.
      Everything is SSL enabled, test domain and the CWP server itself.

      Sep 03 16:33:50 cpanel.servername.com systemd[1]: Starting nginx - high performance web server...
      Sep 03 16:33:50 cpanel.servername.com nginx[21240]: nginx: [warn] conflicting server name "cpanel.servername.com" on 6.232.137.89:80, ignored
      Sep 03 16:33:50 cpanel.servername.com nginx[21240]: nginx: [warn] conflicting server name "cpanel.servername.com" on 6.232.137.89:443, ignored
      Sep 03 16:33:50 cpanel.servername.com systemd[1]: Started nginx - high performance web server.

      I have clean build of centos 7 fully patched, latest CWP script installed. Updated curl, latest apache build and mariaDB using Sandeep's shared posts on here which all worked perfectly without any issue. Thank you Sandeep.

      Apache version: Apache/2.4.46
      PHP version: 7.4.9
      MySQL version: 10.4.14-MariaDB
      FTP version: 1.0.47
      SSH Port: 22
      MySql Port: 3306
      Web Servers: nginx-varnish-apache
      CWPpro version: 0.9.8.1006

      I have created a WebServers Domain Conf for my test domain for Wordpress and have also created a custom Webservers domain conf for the cpanel server itself cpanel.servername.com (servername.com)

      Any help would be greatly appreciated,
      Cheers. G

      1 Reply Last reply Reply Quote 0
      • sandeep
        sandeep last edited by

        can you post the exact redirect error message a screenshot will be helpful

        1 Reply Last reply Reply Quote 0
        • G
          Galactus last edited by

          Hello Sandeep,

          Thank you for replying
          Too many redirects.png

          This is on the test domain which comes up very occasionally, If I restart the Nginx Reverse Proxy service, the site is back working again and will eventually get the too many redirects hours later.

          That is where I noticed the "nginx: [warn] conflicting server name" error I posted above when I click the Nginx Reverse Proxy Status button in CWP to see the log. If I restart Nginx proxy service that conflicting server name shows every time.

          1 Reply Last reply Reply Quote 0
          • sandeep
            sandeep last edited by

            remove any https redirect for htaccess and add this :

            SetEnvIf X-Forwarded-Proto "https" HTTPS=on
            RewriteEngine on
            RewriteCond %{HTTPS} !=on
            RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC]
            RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
            

            or

            RewriteCond %{HTTPS} off
            RewriteCond %{HTTP:X-Forwarded-Proto} !https
            RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [NE,L,R=301]
            

            https://www.mysterydata.com/apache-http-to-https-htaccess-redirect-on-cwp-centos-webpanel/

            1 Reply Last reply Reply Quote 0
            • G
              Galactus last edited by Galactus

              Thank you Sandeep,

              So that should resolve the, port 80/443 servername conflict if I add that to the main cwp domain name cpanel.servername.com .htaccess file as well as my test domain?

              [warn] conflicting server name "cpanel.servername.com" on 6.232.137.89:80, ignored
              [warn] conflicting server name "cpanel.servername.com" on 6.232.137.89:443, ignored

              1 Reply Last reply Reply Quote 0
              • G
                Galactus last edited by

                Sorry missed your url at bottom of post, will follow it.

                1 Reply Last reply Reply Quote 0
                • G
                  Galactus last edited by

                  Can confirm its working now Sandeep, thanks once again for your excellent tech guides.
                  Very much appreciated.

                  Cheers G

                  1 Reply Last reply Reply Quote 2
                  • 1 / 1
                  • First post
                    Last post

                  Recent Topics

                  • How to add a new disk?

                  • Module IPv6 CWP

                  • PHP 8.0.0 testing - CWP

                  • Serious error with quotas

                  • Centos 8 Stream CWP - Delayed Update and CWP repositories are added

                  • Update NGINX Stable v1.16.1 to latest NGINX Stable v1.18.0 for CWP & CWP PRO!

                  • Phpmyadmin New Verison with autologin - CWP

                  • M

                    Install php 7.4 on cwp

                  URLs HOME | Blog | Support Portal