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.

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:
    1
    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:
    14,472
    Likes Received:
    200
    Trophy Points:
    63
    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)
     
  3. namerodl1

    namerodl1 Registered

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

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    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.
     
Loading...

Share This Page