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,622 thoughts on “Setting Multiple Domain pada Apache Tomcat

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

  2. I’m curious to find out what blog platform you happen to be utilizing?

    I’m having some minor security issues with my latest website and I would like to find something more risk-free.
    Do you have any recommendations?

  3. Good day! I could have sworn I’ve visited this blog before but after browsing through many of the
    posts I realized it’s new to me. Regardless, I’m certainly
    happy I found it and I’ll be bookmarking it and checking back regularly!

  4. I’m really enjoying the design and layout of your website.
    It’s a very easy on the eyes which makes it much more pleasant for me to come here and visit more
    often. Did you hire out a developer to create your theme?

    Fantastic work!

  5. Cмотреть новая серия онлайн, Озвучка – Перевод Amedia, Jaskier, ньюстудио, HDrezka Studio Украинский Игра в кальмара 2 сезон 1 серия Проект «Анна Николаевна», Бесстыдники, Теория большого взрыва, Вампиры средней полосы, Звоните ДиКаприо!, Миллиарды – все серии, все сезоны.

  6. I am really inspired along with your writing talents and
    also with the structure to your weblog. Is that this
    a paid topic or did you customize it yourself?
    Either way stay up the excellent high quality writing, it’s uncommon to peer a nice weblog like this one these days..

  7. I like the valuable info you provide in your articles.

    I’ll bookmark your blog and check again right here regularly.
    I’m somewhat certain I will learn many new stuff proper right here!

    Best of luck for the following!

  8. I think this is among the most significant information for me.
    And i’m glad reading your article. But should remark on few general things,
    The website style is perfect, the articles is really nice :
    D. Good job, cheers

  9. What i don’t realize is if truth be told how you’re not actually much more smartly-preferred than you may
    be right now. You are so intelligent. You recognize thus significantly relating to this matter, made me for my part believe
    it from a lot of various angles. Its like women and men are not interested until
    it is something to accomplish with Woman gaga!
    Your own stuffs nice. At all times handle it up!

  10. Kervansaray Tablo markası olarak kanvas tablo, özel günler tablo ve puzzle çerçeve tablo konusunda Konya üzerinden sizlere özenle hizmet sunmaktayız.

  11. Oh my goodness! Amazing article dude! Thank you, However I am experiencing problems with your RSS.
    I don’t know the reason why I can’t subscribe to it. Is there anybody getting the same RSS
    issues? Anyone who knows the solution can you kindly respond?
    Thanks!!

Leave a Reply

Your email address will not be published. Required fields are marked *