Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Apache Mod_Userdir with SSL

Discussion in 'EasyApache' started by vlee, May 29, 2013.

  1. vlee

    vlee Well-Known Member

    Joined:
    Oct 13, 2005
    Messages:
    348
    Likes Received:
    23
    Trophy Points:
    168
    Location:
    Spokane, Washington
    cPanel Access Level:
    Root Administrator
    I would like to how you this below can be done.

    Say you allow users to use this http://host.example.com/~username

    But there is a catch force it is use the Shared SSL Certificate that is on host.example.com

    So they will see this https://host.example.com/~username in the address bar.

    I just want make this feature very secure and free to use for customers.

    Can anyone tell me how to force users to use the Shared SSL Certificate if they want to use this https://host.example.com/~username feature?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,396
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    You could try using a custom Mod_Rewrite rule in the VirtualHost for the hostname of the server (or the host that you have configured as a shared SSL). EX:

    Code:
    <VirtualHost 1.1.1.1:80>
        ServerName host.domain.com
        DocumentRoot /usr/local/apache/htdocs
        RewriteEngine on
        ReWriteCond %{SERVER_PORT} !^443$
        RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]
        ServerAdmin root@host.domain.com
        <IfModule mod_suphp.c>
            suPHP_UserGroup nobody nobody
        </IfModule>
    </VirtualHost>
    The following URL documents how to make a change to a single VirtualHost:

    EasyApache: Changes Contained Within a VirtualHost Directive

    Note that per our documentation, if you want to enable mod_userdir so that shared SSL certificates can be used, you will need to either add users to, or exclude protection from, the virtual host for the domain to which the certificate was issued.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice