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. I do consider all the ideas you’ve presented in your
    post. They’re really convincing and will definitely work.
    Still, the posts are too short for newbies.
    May just you please lengthen them a bit from subsequent time?
    Thanks for the post.

  2. Hello there! This blog post could not be written any better!
    Going through this article reminds me of my previous roommate!

    He always kept talking about this. I am going to send this article
    to him. Fairly certain he’s going to have a very good
    read. Thank you for sharing!

  3. Quality content is the crucial to attract the users to go to see the web page, that’s what this site is providing.

  4. hi!,I like your writing so much! percentage we keep in touch extra about your article on AOL?
    I need a specialist in this space to solve my problem.
    May be that’s you! Having a look ahead to see you.

  5. Excellent way of describing, and nice paragraph to take information about my presentation subject matter, which i am going
    to present in academy.

  6. Hi there! Do you know if they make any plugins to help with Search Engine Optimization? I’m trying to get
    my blog to rank for some targeted keywords but I’m not seeing very good gains.
    If you know of any please share. Thank you!

  7. An outstanding share! I’ve just forwarded this onto a friend
    who has been conducting a little homework on this.
    And he actually bought me dinner due to the fact that
    I found it for him… lol. So allow me to reword this….
    Thanks for the meal!! But yeah, thanx for spending some time to discuss this issue here on your website.

  8. It’s awesome to visit this site and reading the views of all friends on the topic of this post, while I am also
    zealous of getting knowledge.

  9. My developer is trying to persuade me to move to .net from PHP.
    I have always disliked the idea because of the expenses.
    But he’s tryiong none the less. I’ve been using Movable-type on a number of
    websites for about a year and am concerned about switching to another platform.
    I have heard good things about blogengine.net.
    Is there a way I can import all my wordpress posts into it?
    Any help would be really appreciated!

  10. That is really fascinating, You’re an excessively skilled blogger.
    I’ve joined your feed and sit up for looking for extra of
    your excellent post. Additionally, I’ve shared your
    website in my social networks

  11. Hi there, I do believe your website could possibly be having browser compatibility problems.
    When I take a look at your site in Safari, it looks fine however, when opening in Internet
    Explorer, it has some overlapping issues. I just
    wanted to provide you with a quick heads up! Aside from that, great blog!

  12. It’s an amazing paragraph designed for all the internet viewers; they will take benefit from it I
    am sure.

  13. Hello

    YOU NEED QUALITY VISITORS FOR YOUR: umarfaisol.com ?

    We Provide Website Traffic 100% safe for your site, from Search Engines or Social Media Sites from any country you want.
    With this traffic, you can boost ranking in SERP, SEO, profit from CPM

    CLAIM YOUR 24 HOURS FREE TEST HERE=> ventfara@mail.com

    Thanks, Salvatore Salgado

  14. Does your blog have a contact page? I’m having problems locating it but, I’d like to shoot you an e-mail.
    I’ve got some recommendations for your blog you might be interested
    in hearing. Either way, great website and I look forward to seeing it expand over time.

  15. I am extremely impressed with your writing skills and also with
    the layout on your weblog. Is this a paid theme or did
    you modify it yourself? Anyway keep up the nice quality writing, it’s rare to see a nice blog like this one these days.

  16. I really love your site.. Excellent colors & theme.
    Did you create this amazing site yourself? Please reply back as I’m planning to create my own personal website and would like to learn where you got this from or exactly
    what the theme is named. Thanks!

  17. I seriously love your website.. Great colors & theme.
    Did you build this website yourself? Please reply back as I’m attempting to create my very own blog and want to find
    out where you got this from or exactly what the theme is called.
    Many thanks!

  18. Greetings from California! I’m bored to tears at work
    so I decided to check out your website on my iphone during lunch break.
    I really like the info you present here and can’t
    wait to take a look when I get home. I’m surprised at how
    quick your blog loaded on my mobile .. I’m not even using WIFI, just 3G ..
    Anyhow, excellent site!

  19. Oh my goodness! Awesome article dude! Thank you
    so much, However I am encountering issues with your
    RSS. I don’t know why I can’t join it. Is there anybody having similar RSS issues?
    Anyone that knows the solution will you kindly respond? Thanx!!

  20. I’ll right away take hold of your rss feed as I can’t in finding your email subscription hyperlink or newsletter service.

    Do you have any? Please let me know so that I may just subscribe.
    Thanks.

Comments are closed.