Web Hosting Talk







View Full Version : Cpanel: Having web pages at the default IP address


GordonH
06-07-2001, 05:18 PM
Hello
Interesting issue came up today.
I have a spare server that I have decided to use for my parking some domains on.

Each domain has a virtual host entry as normal.
However, I would like a particular page to show up when the default (main) IP address for the server is typed into a browser.

I always thought those files were in /usr/local/apache/htdocs
I have tried that but it doesn't work.
This directory just has the default apache test pages in all the languages and thes erver is not delivering those up at the IP.

I have also tried setting up a virtual host with the server name at that IP address and it didn't work either.

I also tried putting the files in /public_html with no luck either.
I looked at the error logs and it seems that the server went to /public_html and didn't find a file to deliver, nor could it find 404.shtml, so I put that in, created a .htaccess with DirectoryIndex and still nothing.

What is the secret?

How do I get a standard page to show up at the main IP?

Gordon

Hyper Tech
06-07-2001, 08:36 PM
You might try replacing the index page in /home/httpd/html that's where the default page for Red Hat usually is.

GordonH
06-08-2001, 08:29 AM
No
There is no such directory on these servers.
It has to be /public_html but I must be missing something in the httpd.conf file.

Gordon

Madman2020
06-08-2001, 11:06 AM
Originally posted by GordonH
No
There is no such directory on these servers.
It has to be /public_html but I must be missing something in the httpd.conf file.

Gordon

It depends. You can open your httpd.conf file and do a grep for "DocumentRoot" and that directive should give you the info you need.

GordonH
06-08-2001, 11:13 AM
OK
I have fixed it.

The document root was /usr/local/apache/htdocs
but it was not serving up the apache test page when I typed the IP into the browser.

I created a virtual host:

<VirtualHost 216.171.71.201>
ServerName indigo.srv2.com
</VirtualHost>

and this got it working at the IP and the server name!.
It now delivers up the apache test page so I can delete that and put in my default page.

Gordon

Mark Vockler
06-09-2001, 09:39 AM
You can also add DocumentRoot to the directive and have it point to any location you like (not necessarily the Apache default), for instance:

<VirtualHost 216.171.71.201>
ServerName indigo.srv2.com
DocumentRoot /path/to/your/public_html
</VirtualHost>

Mark Vockler
Aletia Hosting