Introduction:-
Apache HTTP Server is a webserver developed and maintained by The Apache Software Foundation. Apache is the most popular web server, used on more than half of all Internet web servers. Most Linux distributions include Apache. Apache's advantages include its modular design, SSL support, stability and speed. Given the appropriate hardware and configuration it can support the highest loads. On Linux systems, the server configuration is usually done in the /etc/httpd directory. The most important configuration file is httpd.conf.
Requirement:-
- Package = httpd
- Service = httpd
- Port No. = 80
- Configuration File = /etc/httpd/conf/httpd.conf
Per quest:-
- Configure IP = 192.168.1.1
- Configure Virtual IP = 192.168.1.10 & 192.168.1.20
- Configure Hostname = server.rootuser.in
- Firewall must be disabled
1] Install required package for apache web server.
2] Edit the /etc/hosts file.
192.168.1.1 www.rootuser.in www
192.168.1.10 www.anup.com www
192.168.1.20 www.shubham.com www
:wq
3] Restart the network service.
4] Append the main configuration file.
NameVirtualHost 192.168.1.1
# Insert following lines at the end of file
<VirtualHost 192.168.1.1:80>
ServerAdmin root@rootuser.in
ServerName www.rootuser.in
DocumentRoot /var/www/html/rootuser
DirectoryIndex index.html
</VirtualHost>
<VirtualHost 192.168.1.10:80>
ServerAdmin root@rootuser.in
ServerName www.anup.com
DocumentRoot /var/www/html/anup
DirectoryIndex index.html
</VirtualHost>
#Following site is port based.
Listen 500
<VirtualHost 192.168.1.20:500>
ServerAdmin root@rootuser.in
ServerName www.shubham.com
DocumentRoot /var/www/html/shubham
DirectoryIndex index.html
</VirtualHost>
:wq
5] Now create the resources for website
<b bgcolor=pink>Welcome to RootUser.in</b>
^d
<b bgcolor=yellow>Welcome to anup.com</b>
^d
<b bgcolor=green>Welcome to shubham.com</b>
^d
6] Start the httpd service
*Point your browser to following URL:
[ If these website are opening without error then your Apache web server is working properly. ]
1 comment:
hello
Post a Comment