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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Moving .htaccess to httpd.conf Issue

Discussion in 'General Discussion' started by ctrenks, May 19, 2017.

  1. ctrenks

    ctrenks Member

    Joined:
    Oct 30, 2014
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Currently I am in the process of moving my .htaccess data into include files for my server, I have one domain, one account on the server.

    using this Modify Apache Virtual Hosts with Include Files - EasyApache 4 - cPanel Documentation

    I created a file /etc/apache2/conf.d/userdata/ssl/2_4/myname/htaccess.conf

    added

    Code:
    <Directory "/www/c">
        Options +FollowSymLinks +Multiviews +Indexes
        AllowOverride None
        AuthType basic
        AuthName "private"
        AuthUserFile "/home/allfreec/.htpasswds/www/c/passwd"
        Require valid-user
    </Directory>
    
    
    /usr/local/cpanel/scripts/rebuildhttpdconf

    got OK, ran restart httpd all was good.

    But the directory /www/c/ is not locked

    I am using cloudflare for the front end with their cert, I assume it still comes as SSL into my server.

    also, If i use a file for the domain do I need to do a www.example.com as well as example.com to enforce?

    Thanks
    Chris
     
    #1 ctrenks, May 19, 2017
    Last edited by a moderator: May 24, 2017
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you verify if you are intending to use this custom document root? The document root path for an account by default is /home/$username/public_html so you'd need to use a path such as this if the directory name for the account is "c":

    Code:
    /home/$username/public_html/c
    Thank you.
     
Loading...

Share This Page