1

This isn't so much of a problem, but would like to know why this happens.

we have a dedicated server running WHM. If I access the server via its IP address directly I am automatically redirected to

http://xx.xxx.xx.xxx/cgi-sys/defaultwebpage.cgi

I know how to edit this page (this isnt the problem)

I'm just curious why I get redirected to this .cgi page, rather than simply remain @

xx.xxx.xx.xxx/ and view my default "landing page", if you like.

What setting could I change so that if anyone visits my server IP, they do not get redirected to xx.xxx.xx.xxx/cgi-sys/defaultwebpage.cgi

For instance if you visit 173.194.37.104 (google), you view the google home page, but URL remains the same.

Hope this makes sense.

thanks

1
  • 2
    I get the strangest feeling I've just stepped back into 1994. Feb 6, 2013 at 9:00

2 Answers 2

2

Not sure if you're still trying to figure this out, but you need to edit your httpd.config. You should be able to find it at the following location if you are on a VPS or dedicated server. /etc/httpd/conf/httpd.config

find where it looks like this. Usually surounded by "do not edit this"

<VirtualHost xxx.xxx.xxx.xxx:80>
    ServerName domain.com
    ServerAlias www.domain.com
    DocumentRoot /home/domain/public_html
    ServerAdmin [email protected]
    UseCanonicalName Off
    CustomLog /usr/local/apache/domlogs/domain.com combined
    CustomLog /usr/local/apache/domlogs/domain.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    ## User domain # Needed for Cpanel::ApacheConf
    <IfModule mod_suphp.c>
        suPHP_UserGroup domain domain
    </IfModule>
    <IfModule !mod_disable_suexec.c>
        SuexecUserGroup domain domain
    </IfModule>
    ScriptAlias /cgi-bin/ /home/domain/public_html/cgi-bin/

</VirtualHost>
0

I had the same behavior and I was going to hit my head to the wall because of that :(. The reason why you are getting this is because the content of /etc/httpd/htdocs/index.html IS

<html><head><META HTTP-EQUIV="refresh" CONTENT="0;URL=/cgi-sys/defaultwebpage.cgi"></head><body></b‌​ody></html> 

It takes 2 days for me to figure this out. If you managed to land your request on your server but the name you are requesting -the IP in our case- is not exist in the apache virtual hosts, the apache is going to response with this file. ;-)

You must log in to answer this question.