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.

90 thoughts on “Setting Multiple Domain pada Apache Tomcat

  1. NOT SATISFIED WITH YOUR HOSTING ?

    Check Out Our Coupons for This Month & Get Your Domain, Hosting and SSLs For Less!
    Namecheap Offers Amazing Deals That Save You Money Across Our Product Range!
    Best Value Web Products. 20 Years Serving You. Free WhoisGuard. #1 for Value Vs. Others.

    Check Out Our Coupons for This Month => https://zeep.ly/5uSUK

  2. Hello

    YOU NEED HELP FOR SEO LINK BUILDING?

    I just checked out your website umarfaisol.com, and wanted to find out if you need help for SEO Link Building ?

    We offer you the BEST SEO STRATEGY for 2021, my name is Adele, and I’m a SEO Specialist.

    Build unlimited number of Backlinks and increase Traffic to your websites which will lead to a higher number of customers and much more sales for you.

    If You Are Interested, I’m waiting for your response here => https://bit.ly/32uQKuH

    Thanks,
    SEO Specialist

  3. Hello would you mind sharing which blog platform you’re
    using? I’m going to start my own blog soon but I’m having a tough time deciding
    between BlogEngine/Wordpress/B2evolution and Drupal.
    The reason I ask is because your design seems different then most
    blogs and I’m looking for something unique.
    P.S My apologies for being off-topic but I had to ask!

  4. Hey would you mind letting me know which webhost you’re working
    with? I’ve loaded your blog in 3 different browsers and I must say this blog loads a
    lot faster then most. Can you recommend a good web hosting provider at a reasonable price?
    Thank you, I appreciate it!

  5. Woah! I’m really digging the template/theme of this
    website. It’s simple, yet effective. A lot of times it’s
    very hard to get that “perfect balance” between usability and appearance.
    I must say that you’ve done a fantastic job with this.
    In addition, the blog loads very fast for me on Chrome.
    Outstanding Blog!

  6. Hi there just wanted to give you a quick heads up.

    The text in your content seem to be running off the screen in Ie.

    I’m not sure if this is a formatting issue or something to do with web browser compatibility but I figured I’d post to let you know.
    The design and style look great though! Hope you get the issue
    fixed soon. Cheers

  7. I will immediately clutch your rss as I can’t to find your e-mail
    subscription link or e-newsletter service.
    Do you have any? Please permit me understand so that I could subscribe.
    Thanks.

  8. Great items from you, man. I’ve take note your stuff prior to and you’re just extremely wonderful. I actually like what you’ve got right here, certainly like what you are saying and the best way wherein you are saying it. You are making it enjoyable and you continue to take care of to stay it smart. I can not wait to read much more from you. This is really a great website.

  9. I enjoy what you guys tend to be up too. This type of clever work and reporting!
    Keep up the fantastic works guys I’ve added you guys to
    my own blogroll.

  10. I will right away grasp your rss as I can’t in finding your e-mail subscription link or newsletter service.
    Do you’ve any? Kindly allow me know in order that I
    may subscribe. Thanks.

  11. I really like what you guys tend to be up too. This kind
    of clever work and coverage! Keep up the awesome works guys I’ve
    included you guys to our blogroll.

  12. I simply could not leave your web site prior to suggesting
    that I actually enjoyed the usual information a
    person supply to your guests? Is gonna be back continuously to check out
    new posts

  13. I’ve been browsing online more than 3 hours as of late, but I never found any fascinating article like yours.
    It’s lovely price enough for me. Personally, if all web owners and bloggers
    made good content as you probably did, the web can be a lot
    more useful than ever before.

  14. Hello

    YOU NEED QUALITY VISITORS FOR YOUR: umarfaisol.com

    WE PROVIDE ORGANIC VISITORS BY KEYWORD FROM SEARCH ENGINES OR SOCIAL MEDIA

    YOU GET HIGH-QUALITY VISITORS
    – visitors from search engines
    – visitors from social media
    – visitors from any country you want

    CLAIM YOUR 24 HOURS FREE TEST => https://bit.ly/2HQZggh

    Thanks, Bridgette Siddins
    If you no longer wish to hear from us, please reply this email.

  15. Hey! This is my first visit to your blog! We are a team
    of volunteers and starting a new project in a community in the same niche.
    Your blog provided us beneficial information to work on.
    You have done a outstanding job!

  16. Hello

    YOU NEED QUALITY VISITORS FOR YOUR: umarfaisol.com

    WE PROVIDE ORGANIC VISITORS BY KEYWORD FROM SEARCH ENGINES OR SOCIAL MEDIA

    YOU GET HIGH-QUALITY VISITORS
    – visitors from search engines
    – visitors from social media
    – visitors from any country you want

    CLAIM YOUR 24 HOURS FREE TEST => https://bit.ly/2HQZggh

    Thanks, Annis Hanran
    If you no longer wish to hear from us, please reply this email.

  17. 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 view, if all webmasters and
    bloggers made good content as you did, the internet will
    be a lot more useful than ever before.

Leave a Reply

Your email address will not be published. Required fields are marked *