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.

3,300 thoughts on “Setting Multiple Domain pada Apache Tomcat

  1. 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.

  2. 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.

  3. 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.

  4. 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!

  5. Hola! I’ve been reading your weblog for some time now
    and finally got the courage to go ahead and give
    you a shout out from Houston Tx! Just wanted to tell you keep
    up the fantastic job!

  6. I have been surfing online more than 2 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 internet will be much more useful than ever before.

  7. Currently it sounds like Drupal is the top blogging platform available right now.
    (from what I’ve read) Is that what you are using on your blog?

  8. That is very fascinating, You are a very professional blogger.
    I’ve joined your feed and look forward to seeking more of your great post.
    Additionally, I have shared your site in my social networks

  9. Helpful information. Fortunate me I found your site by chance, and I am stunned why this twist of fate did
    not came about earlier! I bookmarked it.

  10. Hi this is kinda of off topic but I was wondering if blogs use WYSIWYG editors or if
    you have to manually code with HTML. I’m starting a blog soon but have no coding experience so I
    wanted to get advice from someone with experience.
    Any help would be greatly appreciated!

  11. Hey there! I could have sworn I’ve been to this blog before but
    after reading through some of the post I realized
    it’s new to me. Nonetheless, I’m definitely delighted I found it and I’ll be book-marking and checking back often!

  12. This piece of writing is truly a pleasant one it helps new internet visitors, who are wishing in favor
    of blogging.

Comments are closed.