Follow the following steps:
1. Installed the Apache httpd in Apache server.
2. Install the java or upgrade
3. Install the tomcat in web server.
4. Access the virtual host from client with domain name.
In more details:
1. Installed the Apache httpd in Apache server.
Logging into the Apache server with root user
Note: I'm using the,Red Hat Enterprise Linux
# yum install httpd
To start/stop/restart the Apache/httpd, run:
# chkconfig httpd on
# /etc/init.d/httpd start/stop/restart
Edit the Apache conf file, httpd.conf located under /etc/httpd/conf/httpd.conf
#vi /etc/httpd/conf/httpd.conf
Add the below in end of file
<VirtualHost *:80>
DocumentRoot /home/www/www.tutorialbyexample.com
ServerName www.tutorialbyexample.com
ProxyPass /
ajp://localhost:20010/ retry=0 ttl=600
ProxyPassReverse / ajp://localhost:20010/
ProxyPass /*
ajp://localhost:20010/* retry=0 ttl=600
ProxyPassReverse /* ajp://localhost:20010/*
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /home/www/www.apacheserverwebserver.com
ServerName www.apacheserverwebserver.com
ProxyPass /
ajp://localhost:20020/ retry=0 ttl=600
ProxyPassReverse / ajp://localhost:20020/
ProxyPass /*
ajp://localhost:20020/* retry=0 ttl=600
ProxyPassReverse /* ajp://localhost:20020/*
</VirtualHost>
Save it and close it.
Restart the Apache server: /etc/init.d/httpd restart
Note: # indicate i have logging with root user.
2. Install the java or upgrade
Refer the java installation.
3. Install the tomcat in web server.
Refer the tomcat install in Unix.
Assuming tomcat have installed in both web server and configure with AJP port
Web Server 1 (tomcat with AJP port 20010)
Web Server 2 (tomcat with AJP port 20020)
Just check,
/tomcate/conf/server.xml
and
<Connector
protocol="AJP/1.3"
URIEncoding="UTF-8"
port="20020" />
Restart the tomcat.
Access the both virtual host (vhost) from any client as mention below.
www.tutorialbyexample.com
www.apacheserverwebserver.com
Note: All about in your network accessible area, don't expect this conf for outside of world (over internet).
Reference: vhost
http://www.tutorialbyexample.com/2015/11/apache-virtual-host-webserver-ajp.html, change the
ReplyDeleteajp://localhost:20010/ to ajp://IP-Address-Web-Server-1:20010/
ajp://localhost:20020/ to ajp://IP-Address-Web-Server-2:20020/
Response if any issue while doing this...
Great Article android based projects
DeleteJava Training in Chennai
Project Center in Chennai
Java Training in Chennai
projects for cse
The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training
There are no companies authorized by the consumers without a proper website nowadays. Web design
ReplyDeleteThe writings are so mesmerizing, you can’t spend a minute without them.Web design in Lincoln NE
ReplyDeleteSuch a great blog and all the writings. Can’t help thinking about the author.
ReplyDeletelanding page
Thanks and it's for me Apache Virtual Host Web-server configuration.
ReplyDeleteInteresting and interesting information can be found on this topic here profile worth to see it.
ReplyDeletemason soiza
This blog has expressed its meaning in a very short but clear way, so succinct.
ReplyDeleteBrave Browser