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.

1,719 thoughts on “Setting Multiple Domain pada Apache Tomcat

  1. I am extremely impressed with your writing skills and
    also with the layout on your blog. Is this a paid theme or did you customize it yourself?
    Either way keep up the excellent quality writing, it
    is rare to see a great blog like this one nowadays.

  2. What’s up, all the time i used to check web site posts here in the early
    hours in the dawn, for the reason that i love to gain knowledge of more and more.

  3. This piece of writing will help the internet people for building up new web site or even a weblog from start to end.

  4. Its like you read my mind! You appear to know a lot about this,
    like you wrote the book in it or something. I think that you
    can do with a few pics to drive the message home a little bit, but instead of that,
    this is fantastic blog. An excellent read. I’ll certainly be back.

  5. GET PROFESSIONALLY VIDEOS AT AFFORDABLE PRICES

    We offer professionally produced videos at affordable prices.
    Our videos have the look and feel of a high quality television commercial, complete with professional spokesperson, background, text,
    images, logos, music and of course, most importantly, your company’s contact information for your umarfaisol.com.

    If you’re ready to reach more clients today, let us get to work on producing your company’s exclusive video.
    MORE INFO=> http://vpwb85396.bloggerbags.com/8234991/get-videos-at-affordable-prices

  6. Wow, incredible weblog format! How long have you been running a blog for?
    you made blogging glance easy. The overall look of your site is magnificent, let alone the content material!

Comments are closed.