How to Remove “Red Hat Enterprise Linux Test Page”

When you install a web server on Red Hat Enterprise Linux (RHEL), you may notice that the default page for the server is the “Red Hat Enterprise Linux Test Page.” While this page is useful for testing purposes, it is not appropriate for a production environment.

RedHat Test Page

In this guide, we will show you how to remove the “Red Hat Enterprise Linux Test Page” from your RHEL web server.

Step 1: Connect to your Server

The first step is to connect to your RHEL server using SSH. Open your terminal and run the following command:

ssh username@server_ip_address

Replace “username” with your username and “server_ip_address” with the IP address of your server.

See also  How to Install and Setup Apache Tomcat 8 on CentOS 7 / RHEL 7

Step 2: Remove the Test Page Files

Once you are logged in to your server, you need to remove the test page files. Run the following command to navigate to the web server directory:

cd /var/www/html/

Now, delete the test page files by running the following command:

sudo rm index.html

This command will delete the “Red Hat Enterprise Linux Test Page” from your server.

Step 3: Restart the Apache Service

Finally, you need to restart the Apache service to apply the changes. Run the following command:

sudo systemctl restart httpd

This command will restart the Apache service and apply the changes you made.

See also  How to Install phpMyAdmin on CentOS 6.2 Server

Alternative Solution:

Go to welcome.conf file:

[root@rhel6 ~]# vi /etc/httpd/conf.d/welcome.conf

To disable the Welcome page, comment out all the lines below:

# This configuration file enables the default "Welcome"
# page if there is no default index page present for
# the root URL.  To disable the Welcome page, comment
# out all the lines below.
#
<LocationMatch "^/+$">
    Options -Indexes
    ErrorDocument 403 /error/noindex.html
</LocationMatch>

Comment out all the lines as below:

# This configuration file enables the default "Welcome"
# page if there is no default index page present for
# the root URL.  To disable the Welcome page, comment
# out all the lines below.
#
#<LocationMatch "^/+$">
#    Options -Indexes
#    ErrorDocument 403 /error/noindex.html
#</LocationMatch>

Commands Mentioned:

  • ssh username@server_ip_address – Connect to your server
  • cd /var/www/html/ – Navigate to the web server directory
  • sudo rm index.html – Delete the test page files
  • sudo systemctl restart httpd – Restart the Apache service
See also  How to Install Apache, PHP and MySQL on CentOS 6.2

Conclusion

In this guide, we have shown you how to remove the “Red Hat Enterprise Linux Test Page” from your RHEL web server. By following these steps, you can customize the default page for your web server to suit your needs. We hope this guide has been helpful to you. If you have any comments or suggestions for improvements, please feel free to share them below.

Comments

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *