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,014 thoughts on “Setting Multiple Domain pada Apache Tomcat

  1. Hi Dear, are you truly visiting this web page on a regular
    basis, if so after that you will without doubt obtain good know-how.

  2. Hello! Would you mind if I share your blog with my myspace
    group? There’s a lot of people that I think would really enjoy your content.
    Please let me know. Many thanks

  3. It is perfect 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 want to suggest you few
    interesting things or advice. Perhaps you can write next
    articles referring to this article. I want to read more things about it!

  4. For the reason that the admin of this site is working, no uncertainty very shortly it will be well-known, due to its feature contents.|

  5. Pingback: mnf sex games
  6. In fact no matter if someone doesn’t understand then its up to other users that they will assist,
    so here it occurs.

  7. My brother suggested I might like this web site.
    He was entirely right. This post truly made my day.
    You can not imagine just how much time I had spent for this information!
    Thanks!

  8. Howdy! I know this is somewhat off topic but I was wondering if you knew where I could get a captcha plugin for my comment form? I’m using the same blog platform as yours and I’m having problems finding one? Thanks a lot!|

Comments are closed.