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.

317 thoughts on “Setting Multiple Domain pada Apache Tomcat

  1. It is perfect time to make some plans for the longer term and it
    is time to be happy. I’ve read this submit and if
    I could I wish to recommend you few interesting issues or tips.
    Maybe you can write next articles regarding this article.
    I want to learn more things about it!

  2. I have been surfing on-line more than 3 hours these days, but I by no means found any interesting article like yours.
    It is beautiful value sufficient for me. In my view, if all web owners and bloggers made just right content material as you did, the web will be much more helpful than ever before.

  3. It’s the best time to make some plans for the future and it is
    time to be happy. I’ve read this post and if I could I wish to suggest you some interesting things or suggestions.
    Maybe you can write next articles referring to this article.
    I want to read more things about it!

  4. It is the best time to make some plans for the future and it is time to be happy.
    I have read this post and if I could I desire to suggest you
    few interesting things or advice. Maybe you can write next articles referring
    to this article. I desire to read more things about it!

  5. I’ll right away grab your rss feed as I can’t in finding
    your e-mail subscription link or e-newsletter service. Do
    you’ve any? Kindly allow me realize so that I may subscribe.
    Thanks.

  6. A person necessarily assist to make critically posts I might state.
    This is the first time I frequented your website page and
    thus far? I amazed with the analysis you made
    to create this particular post extraordinary. Wonderful process!

  7. It is appropriate time to make some plans for the longer term and it’s time to be
    happy. I’ve learn this post and if I could
    I wish to suggest you few attention-grabbing things or tips.
    Perhaps you can write subsequent articles referring to this article.
    I want to learn more issues approximately it!

  8. You’ve made ome good points there. I checked on thhe nnet ffor mokre inhfo about thee issxue andd founbd mpst
    ndividuals wilol ggo along wkth our vioews oon this site.

  9. I have been browsing on-line more than three hours nowadays, yet I by no means
    discovered any fascinating article like yours.
    It’s lovely price enough for me. In my view, if all web owners and bloggers made excellent content material as you probably did, the internet might
    be much more useful than ever before.

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

  11. It’s perfect time to make a few plans for the
    long run and it is time to be happy. I’ve learn this put up and
    if I could I wish to suggest you few fascinating issues
    or suggestions. Maybe you can write next articles referring to this article.
    I want to read more issues about it!

  12. 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 opinion,
    if all website owners and bloggers made good content
    as you did, the web will be a lot more useful than ever before.

Leave a Reply

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