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.

Disable Access IP from Visitor in VPS

Discussion in 'Security' started by tomtomdecrab, Jun 28, 2013.

  1. tomtomdecrab

    tomtomdecrab Registered

    Joined:
    Jun 27, 2013
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I am sorry, I am still learning about vps
    I just have cpanel without WHM
    I tried to change the virtual host in httpd.conf
    Code:
    NameVirtualHost domainku.com:80
    
    <VirtualHost 192.161.xxx.xx:80>
        ServerName server.domainku.com
        DocumentRoot /usr/local/apache/htdocs
        ServerAdmin emailku@gmail.com
        <IfModule mod_suphp.c>
            suPHP_UserGroup nobody nobody
        </IfModule>
    </VirtualHost>
    
    <VirtualHost domainku.com:80>
        ServerName domainku.com
        ServerAlias www.domainku.com
        DocumentRoot /home/domainku/public_html
        ServerAdmin webmaster@domainku.com
        UseCanonicalName Off
        CustomLog /usr/local/apache/domlogs/domainku.com combined
        CustomLog /usr/local/apache/domlogs/domainku.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
        ## User domainku # Needed for Cpanel::ApacheConf
        UserDir disable domainku
        <IfModule mod_suphp.c>
            suPHP_UserGroup domainku domainku
        </IfModule>
        <IfModule !mod_disable_suexec.c>
            <IfModule !mod_ruid2.c>
                SuexecUserGroup domainku domainku
            </IfModule>
        </IfModule>
        <IfModule mod_ruid2.c>
            RUidGid domainku domainku
        </IfModule>
        ScriptAlias /cgi-bin/ /home/domainku/public_html/cgi-bin/
    
    
        # To customize this VirtualHost use an include file at the following location
        # Include "/usr/local/apache/conf/userdata/std/2/domainku/domainku.com/*.conf"
    
    </VirtualHost>
    
    If visitor access http://192.161.xxx.xx, they will be redirect to http://192.161.xxx.xx/cgi-sys/defaultwebpage.cgi
    if visitor access http://domainku.com , they will look at my site as normal
    my problem
    after 2 to 3 days, if visitor access http://domainku.com they will be redirect to http://domainku.com/cgi-sys/defaultwebpage.cgi
    and then I try to restart httpd
    Code:
    service httpd restart
    my site to work normally again, after 2 to 3 days will be direct to cgi-sys again
    Please Help Me.......
     
    #1 tomtomdecrab, Jun 28, 2013
    Last edited: Jun 28, 2013
  2. tomtomdecrab

    tomtomdecrab Registered

    Joined:
    Jun 27, 2013
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Anyone help me please...............
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You mentioned that you only have access to cPanel and not Web Host Manager. That would indicate a lack of root access to the server. Could you verify how you are editing the Apache configuration file without root access? You should be able to access Web Host Manager as "root" if you can access SSH as "root".

    Thank you.
     
Loading...

Share This Page