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. What’s Taking place i’m new to this, I stumbled upon this I have found It positively useful and it
    has helped me out loads. I am hoping to contribute
    & help different users like its helped me. Great job.

  2. Heya i’m for the first time here. I found this board and I find It truly useful & it helped me out a lot.
    I hope to give something back and help others like you helped me.

  3. Hi mates, its fantastic paragraph regarding cultureand entirely explained, keep it up all the time.

  4. Having read this I thought it was rather informative.
    I appreciate you taking the time and effort to put this
    content together. I once again find myself personally spending
    a lot of time both reading and commenting. But so what, it was still worthwhile!

  5. whoah this blog is fantastic i love studying your posts.
    Stay up the great work! You recognize, lots of
    persons are searching around for this information, you
    can aid them greatly.

  6. I think this is among the so much significant information for me.
    And i’m glad studying your article. But want to statement on some normal issues,
    The web site taste is great, the articles is in reality great :
    D. Excellent job, cheers

  7. Hello, i feel that i saw you visited my weblog thus i came to
    return the desire?.I’m trying to in finding things to improve my site!I
    guess its adequate to make use of a few of your concepts!!

  8. Its like you learn my mind! You seem to know so much about this,
    like you wrote the e book in it or something. I think that you simply can do with a few percent
    to drive the message home a bit, however instead of that, that is magnificent blog.
    A fantastic read. I’ll definitely be back.

  9. A fascinating discussion is worth comment. There’s no doubt that that you
    need to write more about this topic, it might not be a taboo subject but typically folks don’t talk about such issues.
    To the next! Best wishes!!

  10. Someone essentially lend a hand to make significantly articles
    I would state. This is the very first time I frequented your web
    page and thus far? I amazed with the analysis you made to make this actual publish extraordinary.
    Wonderful task!

  11. I don’t know if it’s just me or if perhaps everybody else experiencing problems with
    your site. It looks like some of the written text on your content are running off the
    screen. Can somebody else please provide feedback
    and let me know if this is happening to them too?
    This may be a issue with my web browser because I’ve
    had this happen previously. Cheers

  12. Write more, thats all I have to say. Literally, it seems as though you relied on the video
    to make your point. You obviously know what youre talking
    about, why waste your intelligence on just posting videos to your
    blog when you could be giving us something enlightening to read?

  13. With havin so much content do you ever run into
    any problems of plagorism or copyright violation? My blog has
    a lot of unique content I’ve either created myself or outsourced
    but it seems a lot of it is popping it up all over the internet without my authorization. Do you know any techniques to
    help reduce content from being stolen? I’d definitely appreciate it.

Comments are closed.