The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Https working but http not

Discussion in 'Security' started by mariusfv, Mar 24, 2013.

  1. mariusfv

    mariusfv Member

    Joined:
    Mar 24, 2013
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    On my VPS I have Centos 6.3 with cpanel.
    I've buy recently a SSL certificate(RapidSSL), after I installed the certificate.
    When I access my domain with HTTP I get:
    /http://www.MyDomain.com/cgi-sys/defaultwebpage.cgi
    If I try to access a custom page(with HTTP) I get page not found -404.

    But IF I access the DOMAIN OR A PAGE with HTTPS everything is OK and working.

    I've installed the plugin: /http://wordpress.org/extend/plugins/wordpress-https/

    the plugin working great, switch to HTTPS only the login and desired pages that is great too BUT of course what is not redirected to HTTPS and is redirect normal to HTTP all pages are not found(404)

    For 2 days I Google'd, read topics, solutions but no solution for me, so interesting HTTPS working but HTTP NOT!

    Can someone help me please, I'm stuck.

    10x in advance!

    P.S

    My default .htaccess is:

    # BEGIN
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END
     
  2. arunsv84

    arunsv84 Well-Known Member

    Joined:
    Oct 20, 2008
    Messages:
    373
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    127.0.0.1
    cPanel Access Level:
    Root Administrator
    Have you tried to clear your browser cache and tried to access the domain?

    Or access the http part of domain from a proxy website like anonymouse.org and see the results.

    Cheers!!!
     
  3. mariusfv

    mariusfv Member

    Joined:
    Mar 24, 2013
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I found the problem but not the solution.

    When i install the RapidSSL certificate was request a dedicated IP so I bought a dedicated IP from my vendor who allocate me the new IP.
    After the certificate was installed successfully.
    I use the panel from my vendor to can use their name servers so not the cpanel. The problem is in httpd.conf because on port 80 remain the old IP and for port 443(SSL) was alocated the new IP.
    So if I access my domain on port 80 with old IP was ok and new IP on port 443.
    I've try to modify in httpd.conf to be the NEW IP but no chance(I try to modify for the domain the new IP in capanel but didn't let me), so I delete the certificate switch back to old IP but the same problem when I access my DOMAIN: cgi-sys/defaultwebpage.cgi.
    I've rebuild my httpd.conf...etc no solution...I'm stuck
     
  4. arunsv84

    arunsv84 Well-Known Member

    Joined:
    Oct 20, 2008
    Messages:
    373
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    127.0.0.1
    cPanel Access Level:
    Root Administrator
    For installing SSL, first of all you need to assign a dedicated ip from WHM >> Change Ip address.

    Once done, install the SSL from WHM>> Install SSL Certificate.

    If you follow the above steps, you wont face any issue.

    If you still face difficulty after following the steps listed above, you can modify the records from backend. Please note that you wont be able to modify httpd.conf from cPanel. You need to login to server via ssh to modify the ip. Location to httpd.conf is /usr/local/apache/conf/httpd.conf

    Open in editor and search for your domain, modify the ip assigned to port 80 to the required one. Distill the changes and restart the apache.

    Cheers!!!
     
  5. mariusfv

    mariusfv Member

    Joined:
    Mar 24, 2013
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Solved!

    The problem was from my mistake because I set the IP on certificate installation before to assign the IP for the domain, so old shared IP remains in httpd.conf for port 80 and for SSL was assigned the new IP on port 443.
    Hard solution was to edit httpd.conf and easy solution was restore a backup or delete the certificate and rebuilt httpd via WHM and after assign the new IP for the domain and after to install the certificate.

    10x for information...
     
  6. arunsv84

    arunsv84 Well-Known Member

    Joined:
    Oct 20, 2008
    Messages:
    373
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    127.0.0.1
    cPanel Access Level:
    Root Administrator
    Great!!!. Glad to know that everything works fine now. :)

    Cheers!!!
     
Loading...

Share This Page