Virtual Host + Apache httpd server + Tomcat + mod_jk connector
HTML-код
- Опубликовано: 9 фев 2025
- In my last post (Virtual Host in Tomcat) we discussed about how setup the virtual host in Tomcat. Its cost effective technique because only one public IP is enough to host multiple domain. If we have big organization and each department want to host their website in locally in different machine. then how to achieve the virtual host concept?. In this post we will see the how we do this.
Vistit : www.ramkitech.c...
Subscribe
www.youtube.com...
Website
www.ramkitech.com
Ramki on Twitter
/ ramkicse
Trust me , your video helped me on 2017 to clear my interview on oracle and now again i'm referring your video to brush up my basics ... Thanks @rama - wonderful work ..
@Rama - You did this video over 7 years ago. I watch a lot of tech videos and rarely comment to the publishers. I sincerely Thank You for this high quality video that is explicit, concise, accurate, and on-point. I have a client that had their system setup at about the same time. They used exactly the configurations you've described here all the way through to domain mapping to specific Tomcat contexts. You've provided a roadmap that now allows me to connect all of the dots, and make changes in this environment to respond to new requests. Well done!
Thanks. Tony
awesome. verified many tutorials and none of them had provided detailed insight into these concepts at one place. great walk-through of each and every step involved. made completely easy to understand whole setup. Great work.
Thanks :-)
Best Explanation I found about Tomcat and Apache
Thanks :-)
Thanks Rama! I searched all the web for this fine tutorial! And finally I found your video. Great Work!!!
Best Explanation till date i found to clear concept for same.Awesome tutorials...:-)
Lokesh pandey Thanks :-)
Thank you RamaKrishnan, this video is complete. I was able to configure my server. Regards.
Really thank you.
Solved my issue which I have been trying from past week
Thank you for helping make this clear for me and taking the time for making the video. Much appreciated!
+Rob Vera Thanks :-)
Awesome tutorial , and I like all series of yours on Tomcat, Appreciate it, Keep doing man.
thanks :-)
Hi Rama,
Thank you very much for sharing this kind of knowledge, this is very helpful just like me that starting to learn on this, very appreciate it.
Anthony Gomez Thank You :-)
Thanks Ram. It is very helpful video for biginners
Very informative ,nice explanation 👍
Thank you so much 🙂
Do you know , how to loadbalance a URL that has, a context say /foo/abc somewhere in it(not exactly after domain name) ? jkmount does not permit to use ^/foo/abc/* , do we have to use location handler ?
How to configure mod_JK for both http and https for multiple tomcats? What changes to be done in workers.properties and tomcat?
Awesome tutorial sir! Such a detailed class !! Superb
Sir thank you this tutorial. I just want to know If what will happen if the application is using a session and the instance of tomcat was stopped? Will it pass the session to other instance of tomcat?
Ramki..Its awesome information...many many thank you..
Can u explain me a little bit about virtual host and jkmount ??
I did exactly what you have shown.After successfully executing --configure No folder is generated in /usr/local.Please help
Dude, How can I to add SSL Certification to this configuration with mod_jk connector and tomcat?... Regards.
Many Thanks Rama...your Guide very much helpful for me
Thanks Raja :-)
Very nice tutorial, I have one doubt why we configuring all the tomcat to Apache server, why cant we use three tomcat server itself for this three different domain. somehow we need three tomcat server for three departments then they can directly contact tomcat itself rite, what the use of configure to Apache server.
Gokul V Yes u can used it. In that case we need 3 public IP address, Its expensive, If its open to public.
In our case one IP and unlimited tomcat can handle the sites
Thanks Ramki :)
;-)
Hi Rama,
I need to run tomcat in other machine while Apache in other, can we connect that too?
is it possiable to install the above setup on CentOS release 6.4 (Final) , please suggest asap ..........thank you
dude..... u are the best..... thank you so much for this awesome video...... helped me alot.....
Hi Ramki,
Do you have any video about configuration of apache web server run in multiple instances on the same server, i have 1 working web server, but when i have created another 1 one, im getting isssue, actually my goal here is created 2 web server run and more instances and configure it as a load balancer.
Appreciate it if you have any video with regarding on this one
Thanks
Tomcat ajp port is not secure in 8.5. But if someone still wants to use AJP along with apche httpd how do we make is secure ?
Excellent explanation. Your Champ. Thank you
I have installed but the problem i am facing that one of my site is having ssl and another is not. So, should i Install the ssl on Apache or on Tomcat??
Please help me out
hi rama
thank you for sharing your knowledge with us . Can i use this virtual host concept for communicating between web logic server and apache httpd server
yes u can use it, find which port ajp task running on weblogic server
Thank you for reply
Do i need apache-web logic server plug-in?
I am using oracle Vm box
if plugin are ther then use it it can reduce our job
I cannot find on which port number ajp is running . Actually iam using oracle vm box i need to make bridge between web logic server and httpd
could you please help me out
thank you
Very clear
Although I have a question, which server's resources will consume on each request?
The main server
Or one of the sub servers?
thanku bro but how to configure for https if we load for https it ask certificate twice instead of one when we request it ask first for apache and second time for tomcat
Thank you so much, it helped me a lot . but I'm facing a problem, my webapp shows on the url the original webapp name, and without it doesn't work my app, can you help me? can I shared my config with you?
All part you said was very right and I have a doubt. I am already running my tomcat server with my applications. Now, How I Can proceed to this stage. In which port I need to install my Apache? I got struck. Can you help me please?
Vennila Gunasekaran which port ur tomcat is running? 80? or 8080
If is 8080 then install apache in port 80. suppose ur tomcat is running on 80 then stop tomcat change the port 8080 and then install apache on 80
Rama krishnnan EP
Thank you.
How to use Server Side Includes with this set up.
Should I change AJP and Shutdown port numbers while installing Tomcat? I mean, Should both Apache and Tomcat have different Http,Ajp and Shutdown Port numbers?
Please Reply me.
yes, http ports should different, tomcat use ajp port, which that port is put in config file of apache
I am getting classNotFound Exception. What to do?
Mar 14, 2015 11:02:18 AM org.apache.catalina.startup.Catalina load
WARNING: Catalina.start using conf/server.xml: Error at (35, 42) : org.apache.jk.config.ApacheConfig
Mar 14, 2015 11:02:18 AM org.apache.tomcat.util.digester.Digester startElement
SEVERE: Begin event threw exception
java.lang.ClassNotFoundException: org.apache.jk.config.ApacheConfig
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:144)
at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1276)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)
at org.apache.catalina.startup.Catalina.load(Catalina.java:601)
at org.apache.catalina.startup.Catalina.start(Catalina.java:663)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
Mar 14, 2015 11:02:18 AM org.apache.catalina.startup.Catalina load
WARNING: Catalina.start using conf/server.xml: Error at (35, 42) : org.apache.jk.config.ApacheConfig
Mar 14, 2015 11:02:18 AM org.apache.catalina.startup.Catalina start
SEVERE: Cannot start server. Server instance is not configured.
why to create department folder??
is that an application?? specified
@Rama, Thank you so much this video helped me a lot though I am facing an issue for me localhost:8080/test-1/ is working but localhost:80/test-1/ is giving me error "The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later." Can you please help me with this?
wow, simple and practical example. Thank you.
Thanks :-)
Thank you so much, it's so nice, Ramki.
I get the following error:
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
(98) Address already in use: make_sock: could not bind to address [::]:80
(98) Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs.
This happens when I try to execute the command ./apachectl start.
Any thoughts on how to solve this? I really need this pls. Thanks!
Some services already running on port 80.
so do
netstat -tlpn
u can see which process running on port 80, may another apache service. either shut down another process or change our apache into some other port like 8080 in conf/httpd.conf file then start the server
very useful info, excellent effort, thanks
Your video is very interesting and helpful. thanks
hi...Rama krishnan nice tutorial. could u please make video with apache2 instead of httpd ,i did not get any resources regarding redirection of tomcat on apache 2 server on debian 8 linux
Sir, I have my web application deployed with netbeans now how should I configure that using apache Tomcat? should i just copy the build folder next to webapps? or i have to do something else? please if possible then make a video on configuring the entire project into apache tomcat and virtual hosting it
The entire web is filled with crap, if we search for anything related to Tomcat or JAVA J2EE except your channel and koushiks one once again thank you :)
Thanks for the video, can u pls suggest how to pass Tomcat server path in workers.properties file...
Hello Amit,
so what kind of error u got?
thank u..very much very useful information...love it...
welcome :-)
Hi this video is very nice and the jk_mod is working for my 3 tier architecture very well. Now, the thing I wanted to know is about mod_proxy.so module, can you make a video on this module to connect to the 2nd tier app server (tomcat). Thanks in advance.
Hi Rama,
Incase i want to enable certificate for security purpose? will AJP be supportive of that?
u can put certificate in Apache httpd server. and make tomcat is non-ssl model.
hi Bro I cant see mod_jk.so file, is this something I have to create. Thank you for help in advance
How to perform all these on windows platform... In need of guidance
Rama ...thanks...very informative...
Thanks Prost :-)
Mr.Roma i run the command "./configure --prefix=/usr/local/apache --enable-rewrite=shared --enable-proxy=shared" then i checked the apache directory i found it empty .. i run it again and again still the apache directory is empty .. please help .. thank you
any one can help !!
after that u need to execute make and make install commands
./configure just check the system satisfied all requirements only, make only compile the code, make install, install final step
Plz provide the updated tutorials about clustering and configure s
This configuration no found, for httpd-2.4.41on centos7
nice work!! I am new to servers and linux and learning a ot from you.. i have a query... if any one can help please..
In apache access logs if i have to count number of access attempts made to my server within a timestamp say from 12:15:00 to 12:50:00 on a perticular day ,,then how will i do so???
can upload the same using redhat 7
thanks Rama Great presentation.
Thanks Pratap :-)
It is very helpful ! thanks.
Very good tutorial, thank you very much!
thanks :-)
Clear explanation
thank you so much man,gr8 job.loving it...!!!
I have one VPS hosting, and now I want to deploy both Java web application and PHP website. How can I do that?
install both tomcat and php. run tomcat in different port. Apache httpd server on port 80. then apply reverese proxy concept to redirect only java request to tomcat.
nice tutorial Rama
thank you very much, really informative.
:-)
Awesome, thank you Rama
xml/apr_xml.c:35:10: fatal error: expat.h: No such file or directory
#include
above is the error coming while using make.
its very intutive. thanks a lot.
U can create the war file through netbeans/eclipse. otherwise u can put folder
you are a life saver
May God Almighty gives you a bundle of happiness in coming year!
How to do the same in Windows Server?
Great tutorial
Great Job..Thanks alot
Hey
I have my web server on xxx.xx.15.46 And application server on xxx.xx.2.249
I have installed WAMP on web server and IDE Eclipse Java 1.8 and Apache Tomcat 8.5 on application server. Both server has Windows server R2 2012.
I am unable to establish connection between different IP Server.
Please help me with this
Thanking in advance
thanks, using screen recording software
Thanks nice video very helpful , how to make http to https redirection
very very nice ..thanks
Excellent..
Thanks Prem
hi ldap for apache httpd sever
Super boss
thanks!
thanks
Thanks Salhaoddin :-)
make command not working
Thanks :-)
typical indian video. Lots of typing without any top-down approach. You should first state explicitly the goal you want to achieve.
So you start with a picture like 12:13, then prove 3 tomcats and 3 apaches work, something like 8:53 - 9:15
Then the rest of the video makes more sense than your far too vague introduction. Introductions should sharply define the goal, you're vlogging to tech guys, not management.
@Kosteri x - I agree that he did not intro the big picture at the start but the detail he provided was explicit, concise, accurate, and on-point. That's minus one cookie for form but one hundred cookies for excellent content. Cut him some slack - as a technician, get over it. This was a truly awesome vid compared to a lot of the crap that we see.
sory, cant understand a single word. trying hard - with max volume, anddddd subtitles run. like you run with talking. 18 sec. and its really unwatchable
really want to watch your video, but it is not possible!!!! talk slower, louder, and dont run with the words. ur indian accent is very strong, u should know it, and slowwwwww it down, have u watched it? understand any thing??? 27 min, and you dident notice it? its sad i can not enjoy your wisdom
Floppy
Sir thank you this tutorial. I just want to know If what will happen if the application is using a session and the instance of tomcat was stopped? Will it pass the session to other instance of tomcat?
when session created its pass to all other instances. when one instance is stoped then it never send anything. all other instance come to know this instance dead by heartbeat signals.
OK man I will try this. Is it possible also to put instance of tomcat and the load balancer to different machine?
Yes u can use Apache httpd webserver or Nginx or HAProxy as load balancer
OK thank you...
It's very helpful. Thanks.
thanks
Floppy
Floppy
Floppy