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.

10,274 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.

  13. I needed to thank you for this good read!! I absolutely enjoyed every little bit
    of it. I’ve got you book-marked to check out new stuff you

  14. What’s Taking place i am new to this, I stumbled upon this I have found It absolutely helpful and it has aided me out loads. I hope to give a contribution & aid different customers like its aided me. Great job.

  15. It’s 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 some
    interesting things or suggestions. Maybe you can write next articles referring to this article.
    I desire to read more things about it!

  16. It is perfect 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 desire to suggest you some interesting things or tips.
    Perhaps you could write next articles referring to this
    article. I want to read even more things about it!

  17. Hello would you mind letting me know which webhost you’re using?
    I’ve loaded your blog in 3 completely different browsers and I must say this blog loads a lot quicker then most.
    Can you recommend a good internet hosting provider at a honest price?
    Thanks a lot, I appreciate it!

  18. Valuable information. Fortunate me I found your web site by chance, and I’m shocked why this accident
    did not took place earlier! I bookmarked it.

  19. At this time I am going away to do my breakfast,
    later than having my breakfast coming yet again to read
    further news.

  20. Thank you a lot for sharing this with all folks you really
    recognize what you’re speaking approximately!
    Bookmarked. Kindly additionally consult with my site =).
    We could have a hyperlink trade arrangement among
    us

  21. Hi there to all, as I am in fact keen of reading this webpage’s post to be updated on a regular
    basis. It contains nice data.

  22. No matter if some one searches for his necessary thing, so he/she needs to be available that in detail, therefore that thing is
    maintained over here.

  23. Hey, I think your website might be having browser compatibility issues.

    When I look at your blog in Ie, it looks fine but when opening in Internet Explorer, it has some overlapping.
    I just wanted to give you a quick heads up! Other then that, awesome blog!

  24. Heya outstanding blog! Does running a blog like this take a great deal of work?
    I have virtually no knowledge of programming however I was hoping to start my own blog in the near future.
    Anyhow, should you have any ideas or techniques for new blog owners
    please share. I understand this is off subject but
    I simply wanted to ask. Thanks!

  25. Ahaa, its pleasant discussion concerning this article here
    at this blog, I have read all that, so at this time
    me also commenting here.

  26. Hi, i think that i saw you visited my web site so i
    came to “return the favor”.I am trying to find
    things to improve my web site!I suppose its ok to use
    a few of your ideas!!

  27. Superb site you have here but I was curious about if you knew of any community forums that
    cover the same topics talked about in this article? I’d really
    like to be a part of community where I can get feed-back from other knowledgeable people that
    share the same interest. If you have any suggestions, please let me
    know. Thanks!

Comments are closed.