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.
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.
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.
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
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.
2 Comments
I had the same problem..
all i did was ” i changed my port number in LAN settings”
and it worked..(port 8080)
all i did was adding “/?” after the website address, if doesn’t work just add another “?” for example http://www.google.com/? or http://www.google.com/?? have no idea how it works