Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6233027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:13:28+00:00 2026-05-24T10:13:28+00:00

I have a java application responding multiple domains and uses, for each domain, a

  • 0

I have a java application responding multiple domains and uses, for each domain, a specific apache virtual host. This because Apache is faster than tomcat, to serve static resources.

The need is to do that at runtime, without restart apache configuration.
To perform this action I’m using VirtualDocumentRoot directive, as described below:

AddType text/html .html .shtml
AddOutputFilter INCLUDES .html .shtml

NameVirtualHost *:80
UseCanonicalName Off
<VirtualHost *:80>
    ServerName domain.com
    ServerAlias *

    # Define virtual host directory, using entire domain
    VirtualDocumentRoot /path/to/whosts/%0

    # Define directory access
    <Directory "/path/to/whosts/">
        Options -Indexes MultiViews +Includes
        Order allow,deny
        Allow from all
    </Directory>

    # Define Java Proxies
    <Proxy *>
        AddDefaultCharset Off
        Order deny,allow
        Allow from all
    </Proxy>

    # Allow Libs (static resources) to access apache directly
    ProxyPass /libs !
    ProxyPass / ajp://localhost:8009/
    ProxyPassReverse / ajp://localhost:8009/
</VirtualHost>

This does not work well, because if I try to access to http://www.domain.com, is different than access to domain.com.

Do you think is a good idea to register a symbolic link from http://www.domain.comto domain.com???

Exists another way to do that? I’m really poor in apache managing…

Thank’s a lot!

Ciao, Davide.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T10:13:29+00:00Added an answer on May 24, 2026 at 10:13 am

    I regularly use symlinks to link multiple domains to the same webroot when doing configurations similar to this, there is no explicit harm in that solution so definitely no reason to shy away from it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Java application that uses an Apache Derby database with the embedded
I have a Java application, built with eclipse, that uses QTJambi. Running the application
I have this java application and ran into a requirement to parse an STDF.
I have a java application on Websphere that is using Apache Commons FTPClient to
I have a Java application which runs on an embedded device. Because different devices
I have a java application build upon Spring 3. This project has another jar
I have a Java application that launches another java application. The launcher has a
I have a Java application which I want to shutdown 'nicely' when the user
I have a Java application that monitors a folder for incoming XML files. When
I have a Java application that's very String-heavy - it takes a feed of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.