Disable Access IP from Visitor in VPS

tomtomdecrab

Registered
Jun 27, 2013
2
0
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 [email protected]
    <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 [email protected]
    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.......
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
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.