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!

Where to put htaccess for cpanel

Discussion in 'General Discussion' started by namerodl1, Jun 7, 2010.

  1. namerodl1

    namerodl1 Registered

    Joined:
    Jun 7, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    51
    I want to edit the htaccess file that is used when I go to https://IP:2087 because I dont want people to be able to access it if they happens to put :2087 after my webserver IP address.

    Does anyone know where the default location of my cpanel files would be located? :p
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,311
    Likes Received:
    393
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    That's not actually a cPanel file persay, but more of a server wide file. It's not available to the end user with a cPanel account. Any changes you made to that configuration would be lost after any upgrade as well, I would think. (I'm guessing)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. namerodl1

    namerodl1 Registered

    Joined:
    Jun 7, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    51
    i still dont have access to it even if i have root access to the VPS?
     
  4. cPanelJared

    cPanelJared Technical Analyst

    Joined:
    Feb 25, 2010
    Messages:
    1,835
    Likes Received:
    20
    Trophy Points:
    143
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    What you are describing is not possible

    cPanel uses its own daemon, not Apache, to listen for requests on its ports, and .htaccess files are not used. cpsrvd, the main cPanel daemon, always listens on ports 2086 and 2087. There is no way to change the ports that cpsrvd listens on, or to shut down certain ports, without completely shutting down the cpsrvd daemon (and leaving cPanel non-functional).

    The closest that you could come to what you want is using iptables firewall rules to restrict access to port 2087 to certain source IP addresses. This could cause a problem, however, if your local IP address changes, which is likely if you happen to use an Internet provider that allocates IP addresses dynamically.
     
    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