Setting Multiple Domain pada Apache Tomcat

Tutorial

Banyak domain (Multiple domain) dapat diletakkan pada satu mesin/server dengan satu web server, misalnya Tomcat, Apache atau IIS. Cara seperti ini dapat digunakan untuk menghemat IP publik. Beberapa domain dan subdomain misalnya www.domainku.com, blog.domainku.com dan download.domainku.com dapat di-host pada satu web server dengan satu IP publik.

Pada tomcat, yang perlu dilakukan adalah menambahkan beberapa konfigurasi:

Pertama,
Buka file server.xml pada ${CATALINA_HOME}/conf
${CATALINA_HOME} adalah direktori tempat tomcat diinstall. Misalnya /usr/local/tomcat pada linux atau c:\tomcat ada Windows tergantung dimana Tomcat diinstall, kemudian tambahkan kode berikut:

<Server>
     <Service>
         <Engine>
           ..................
           ..................
           <Host name="blog.domainku.com"
                       debug="0"
                       appBase="/home/user/blog"
                       unpackWARs="true"
                       autoDeploy="true"
                       xmlValidation="true"
                       xmlNamespaceAware="false">
                    <Alias>blog.domainku.com</Alias>
           </Host>
         </Engine>
     </Service>
 </Server>

Kedua,
Masuk ke direktori ${CATALINA_HOME}/conf/Catalina dan buat direktori baru blog.domainku.com

Ketiga,
Masuk ke direktori ${CATALINA_HOME}/conf/Catalina/blog.domainku.com dan buat file baru dengan nama ROOT.xml yang isinya adalah sebagai berikut:

<Context docBase="/home/user/blog" path="" />

Terakhir,
Restart tomcat.

1,719 thoughts on “Setting Multiple Domain pada Apache Tomcat

  1. Hi! I could have sworn I’ve been to this blog before but after reading through some of the post I realized it’s new to me. Anyhow, I’m definitely glad I found it and I’ll be bookmarking and checking back frequently!|

  2. Having read this I thought it was very informative. I appreciate you taking the
    time and energy to put this short article together.
    I once again find myself spending way too much time both
    reading and commenting. But so what, it was still worth it!

  3. Hello there! Do you use Twitter? I’d like to follow you if that would be okay. I’m undoubtedly enjoying your blog and look forward to new updates.|

  4. I’ve been browsing online more than 2 hours today,
    yet I never found any interesting article like yours.
    It’s pretty worth enough for me. In my opinion, if all site owners and bloggers made good content
    as you did, the internet will be much more useful than ever before.

  5. I’m amazed, I must say. Rarely do I come across a blog that’s
    both equally educative and interesting, and without a doubt, you’ve hit the
    nail on the head. The problem is an issue that not enough folks are speaking intelligently about.
    Now i’m very happy that I came across this during my search for something concerning this.

  6. Excellent way of explaining, and nice paragraph to take data concerning my presentation subject matter, which i am going to deliver in university.|

  7. I’ve been browsing online more than three hours nowadays, but I by no means found any attention-grabbing article like yours. It is pretty worth sufficient for me. Personally, if all site owners and bloggers made just right content as you probably did, the internet shall be much more useful than ever before.|

  8. Magnificent beat ! I wish to apprentice even as you amend your web site, how can i subscribe for a blog web site?
    The account helped me a appropriate deal. I had been tiny bit familiar of this your broadcast offered vivid clear
    concept

  9. constantly i used to read smaller articles or reviews that as well clear their motive, and that is also happening with this paragraph which I am reading at this place.|

  10. Right now it appears like WordPress is the top blogging platform available right now. (from what I’ve read) Is that what you’re using on your blog?|

  11. I’ve been exploring for a little for any high-quality articles or blog posts in this sort of house . Exploring in Yahoo I eventually stumbled upon this web site. Studying this info So i am happy to show that I’ve a very good uncanny feeling I found out just what I needed. I so much definitely will make certain to do not forget this site and provides it a look on a continuing basis.|

  12. Tüm cerrahi estetik operasyonlar için yaş sınırı 18’dir. Biz hastalarımıza cerrahi operasyon gerektiren işlemler için 20 yaşı önermekteyiz. Çünkü vücut 18’li yaşlarda bile gelişmeye devam etmektedir. Bu nedenle erken müdahaleye herhangi bir sağlık riski bulunmadığı sürece karşıyız. https://sadecesaglik.xyz/

  13. Hey there! Do you use Twitter? I’d like to follow
    you if that would be okay. I’m definitely enjoying your blog and look forward to
    new updates.

  14. I think that is one of the most significant info for me.
    And i’m glad studying your article. However wanna remark on few normal things,
    The site style is great, the articles is in point of
    fact excellent : D. Good job, cheers

Comments are closed.