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.

9,917 thoughts on “Setting Multiple Domain pada Apache Tomcat

  1. Hey! Someone in my Myspace group shared this site with us so I came to
    look it over. I’m definitely enjoying the information. I’m bookmarking and will be tweeting this to
    my followers! Superb blog and terrific design and style.

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

  3. Woah! I’m really loving the template/theme of this
    site. It’s simple, yet effective. A lot of times it’s tough to get that “perfect balance” between superb usability and appearance.
    I must say that you’ve done a excellent job with this. Additionally, the blog loads super fast for me on Safari.
    Exceptional Blog!

  4. Hi! I know this is sort of off-topic but I had
    to ask. Does operating a well-established blog like yours require a large amount of work?

    I’m completely new to operating a blog however
    I do write in my journal daily. I’d like to start a blog so I can share
    my experience and feelings online. Please let me know if you
    have any recommendations or tips for new aspiring bloggers.

    Thankyou!

  5. Greetings! Very helpful advice in this particular article!
    It is the little changes that produce the greatest changes.

    Thanks a lot for sharing!

  6. I’ve been surfing online more than 3 hours today, yet
    I never found any interesting article like yours.
    It is pretty worth enough for me. In my opinion, if all webmasters and bloggers made good content as
    you did, the net will be a lot more useful than ever before.

  7. I’ve been surfing online greater than 3 hours nowadays, but
    I by no means discovered any interesting article like yours.
    It is pretty worth sufficient for me. In my opinion, if all website owners and bloggers
    made good content as you probably did, the net can be much more helpful than ever before.

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

  9. I seriously love your blog.. Great colors & theme. Did you build this amazing site yourself?
    Please reply back as I’m attempting to create
    my own personal blog and would like to learn where you got this from or
    what the theme is called. Many thanks!

  10. I have to thank you for the efforts you have put in writing this website.
    I’m hoping to see the same high-grade blog posts by you later on as well.
    In fact, your creative writing abilities has inspired me to get my own site now 😉

  11. I simply couldn’t go away your website prior to
    suggesting that I extremely enjoyed the standard information a
    person provide to your visitors? Is going to be again steadily to inspect new posts

  12. Ahaa, its nice conversation regarding this post at this place at this
    weblog, I have read all that, so at this time me also commenting at this place.

  13. I’ve been surfing online more than three hours lately, yet I by no means found any interesting article like yours.
    It’s lovely price enough for me. In my view,
    if all website owners and bloggers made good content material
    as you did, the internet will probably be much more helpful
    than ever before.

  14. Woah! I’m really enjoying the template/theme of this site.

    It’s simple, yet effective. A lot of times it’s challenging to get that “perfect balance” between usability and visual appeal.
    I must say you’ve done a great job with this.
    Also, the blog loads extremely fast for me on Internet explorer.
    Exceptional Blog!

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

  16. Wow, incredible weblog structure! How long have you been running a
    blog for? you make running a blog look easy. The overall look of your site is excellent, as smartly as the content!

  17. It is perfect time to make some plans for the future and it’s time to be happy.
    I have read this post and if I could I wish to suggest
    you some interesting things or advice. Maybe you could write next articles referring to this article.
    I wish to read even more things about it!

  18. Woah! I’m really enjoying the template/theme of this blog.
    It’s simple, yet effective. A lot of times it’s very hard to get that “perfect balance” between user friendliness and visual appearance.
    I must say you’ve done a awesome job with this. Additionally, the blog loads super fast for me on Firefox.
    Excellent Blog!

  19. Hello! Someone in my Myspace group shared this site with us so I
    came to take a look. I’m definitely loving the information. I’m book-marking and will be tweeting this
    to my followers! Great blog and amazing style and design.

  20. Howdy would you mind sharing which blog platform you’re using?
    I’m looking to start my own blog in the near future but I’m having a
    difficult time deciding between BlogEngine/Wordpress/B2evolution and
    Drupal. The reason I ask is because your design and style seems different then most blogs and I’m looking for
    something unique. P.S Sorry for getting off-topic
    but I had to ask!

Comments are closed.