How to configure Apache Web Server in Red Hat Enterprise Linux 6
Get the step by step tutorial to configure Apache Web Server in your Red Hat Enterprise Linux 6. Discover the packages require to set up Apache Web Server to create and publish your own website in internet. Read the article below to get the full details.
Configuring web server is simple in Red Hat Enterprise Linux 6. The Apache Web Server package is available in official Red Hat repository and easy to install. The configuration is made mostly on command line interface rather than graphical user interface. Most options are available in command mode and it is good to stick using it. The command line interface has got more functionality than GUI's. You will enter command in the Terminal emulator. To open Terminal, right click on the desktop and click on "open in terminal". Apache Web Server packages
To configure Apache Web Server in your Red Hat Enterprise Linux 6, install following packages.
#yum install httpd* -y
#yum install apr* -y
The above packages will install necessary configuration files in your operating system. Apache Web Server configuration
1. Start the http daemon to communicate between server and client. It can be done by starting httpd service which we have installed just before.
#/etc/init.d/httpd start
The above command makes the service to run for a single session (i.e) if you reboot your system, httpd service will be stopped. To run the service permanently even after reboot use the following command.
#chkconfig httpd –level 35 on
After using the above command httpd service will start everytime you boot up the system. The level 35 option is used to mention the Apache Web Server service to start either mode (graphical or non graphical).
Now launch Firefox and enter "localhost" in the web address bar without quotes. It will now display the new web server. Now this will be visible to all the computers connected to the LAN. You can also configure the web server and allow access to the internet. So if you like to configure web server to allow access to your website through internet follow the steps in below section. Publish your web site to internet
You can allow internet to view your web site by opening firewall. The configuration depends on how you are connected to the internet, either through LAN or direct connection. For this you need to modify the firewall and DSL configuration to allow internet to view your web site.
DSL configuration:
In DSL configuration all you need to do is modify the NAT configuration by entering the following command.
#set nat entry add 10.0.0.1 80 192.168.32.254 80
#write
Firewall configuration:
This configuration is made to allow the internet to access your website. Technically, you are giving access to port 80 of you Apache Web Server. This can be done by assigning the following firewall rule.
#iptables -A INPUT -p tcp -m state –state NEW,ESTABLISHED -j -dport 80
Hurrah, now the web server configuration is complete and you can access your website from the internet.
Read How to install and configure WAMP Server for PHP Development
This tutorial indeed is very detailed for me to get some understanding about how to install and configure Apache web server...but some issues still confuse me.I find the answer on https://bestvps.us/configure-apache-web-server-on-linux-vps/..