How do I set the primary IP address to display the default Apache page for my cPanel environment?

When cPanel is installed, the primary IP address for the server should display a default Apache page within a web browser. When you begin adding websites through cPanel, the first website added may start displaying for the primary IP address. This can be fixed to display the default Apache page by manually modifying the apache configuration file on the server.

To restore the default Apache page, please follow these steps:

  1. Log into your cPanel web server via Secure Shell (SSH).
  2. Located the httpd.conf file using the following command:
    located httpd.conf
  3. Open the httpd config file found in step 2 using the following command:
    pico /usr/local/apache/conf/httpd.conf
  4. Find the first VirtualHost container in the file. It will look similar to the following: (xx.xx.xx.xx will be the primary IP address of your server)

    BytesLog domlogs/cptemp.safesecureweb.com-bytes_log
    ServerName cptemp.safesecureweb.com
    DocumentRoot /usr/local/apache/htdocs
  5. Above this section, add the following:

    ServerAlias xx.xx.xx.xx
    ServerAdmin admin@domain.com
    DocumentRoot /usr/local/cpanel/htdocs
    ServerName xx.xx.xx.xx
  6. Save and exit the file.
  7. Test the config file to ensure the text you entered is properly formatted using the following command:/etc/init.d/httpd configtest
  8. Assuming the test returns the messageĀ Syntax OK, restart Apache using the following command:/etc/init.d/httpd restart

The restart of Apache will make your websites unavailable for a few seconds.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Check if IP is Blocked, How to Unblock it from Client Area

If you are hosted on a WHM/CPanel server with our Server Management package your servers you...

Check if IP is Blocked, How to Unblock it from Client Area

If you are hosted on a WHM/CPanel server with our Server Management package your servers you...

How do I access my webmail (Check emails using a browser)?

To login to your webmail use one of the following urls:CPanel...

Enabling Domain Keys In cPanel

cPanel by default provides the ability to enabled Domain Keys instead of the Exim MTA (Mail...

Enabling Domain Keys In cPanel

cPanel by default provides the ability to enabled Domain Keys instead of the Exim MTA (Mail...