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

 

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.

NOTE: The following instructions involve updating configuration files directly on your server. If you are not familiar with updating configuration files, please contact support for assistance.

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.

  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

..htaccess guidance

  .htaccess guidance .htaccess is a special Apache file that tells your website how to...

Linux Sites preview Offline

Linux Site's Preview Offline   http://IP_address/~UserName OR http://ServerName/~userName...

How to scan your website's data from CPanel?

Welcome the comprehensive step-by-step guide by our web hosting company on how to scan your...

How Can I Download a Backup of Full cPanel Account Using FTP?

If you want to download a backup of your website using FTP, please follow these easy steps below:...

How to create an addon domain?

An add-on domain is a fully functional domain and it can be created by using your Cpanel. Add-on...