Thanks to everyone for all the excellent and interesting replies. They (the replies) have really gotten the creative thought process going.

From the responses so far. It sounds like messing with the uri is
problematic.


Now, I know this is the Tomcat mailing list, but everyones ideas have brought up some interesting questions on configuring Apache.

So, currently we have a different entry for everyone of our clients in our httpd.conf file:

<VirtualHost *:80>
  ServerName <client name 1>.<server name>.com
  DocumentRoot <some directory>/<client name 1>.<server name>.com
</VirtualHost>

<VirtualHost *:80>
  ServerName <client name 2>.<server name>.com
  DocumentRoot <some directory>/<client name 1>.<server name>.com
</VirtualHost>

Would changing the ServerName attribute to <server name>.com allow Apache to respond to all requests sent to the server that are subdomains? So, if the only entry in our httpd.conf file is:

<VirtualHost *:80>
  ServerName <server name>.com
#   DocumentRoot <some directory>/<client name 1>.<server name>.com
</VirtualHost>

Would Apache handle requests for the following domain names:

<client 1>.<server name>.com
<client 2>.<server name>.com
<client 3>.<server name>.com
etc...


Here is another question involving Apache, but this time with SSL. Would a wildcard certificate be able to work in the same fashion as the above configuration? As of right now we have to have a NEW IP address for everyone of our clients that request to have a secure site. Which is a major pain. We have to request a new IP address from our ISP, have the hardware load balancer configured for the new IP adress, add new internal IP address to each of our load balanced servers, and then finally edit all our httpd.conf/server.xml files.

Can we do the following in our ssl.conf file and not receive the "Security Domain Mismatch Error" dialog box?

<VirtualHost <generic ip address>:443>

    DocumentRoot "/www/htdocs/<server name>.com"
    Alias /base/ "/www/htdocs/"

    ServerName <server name>.com:443
    ServerAdmin webmaster@<server name>.com
    ErrorLog /logs/httpd/ssl_error_log
    TransferLog /logs/httpd/ssl_access_log

    #   SSL Engine Switch:
    #   Enable/Disable SSL for this virtual host.
    SSLEngine on

    #   SSL Cipher Suite:
    #   List the ciphers that the client is permitted to negotiate.
    #   See the mod_ssl documentation for a complete list.
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL

    SSLCertificateFile /www/certs/*.<server name>.com.crt
    SSLCertificateKeyFile /www/certs/*.<server name>.com.key

    <Files ~ "\.(cgi|shtml|phtml|php3?)$">
        SSLOptions +StdEnvVars
    </Files>
    <Directory "/usr/local/apache2/cgi-bin">
        SSLOptions +StdEnvVars
    </Directory>

    SetEnvIf User-Agent ".*MSIE.*" \
             nokeepalive ssl-unclean-shutdown \
             downgrade-1.0 force-response-1.0

    CustomLog /usr/local/apache2/logs/ssl_request_log \
              "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

</VirtualHost>

Or will we still require one distinct IP address per sub domain?


We've changed the Host directive in our Tomcat server.xml from:

<Host name="<client name 1>.<server name>.com" appBase="webapps">
  <Context path="/app" >
  </Context>
  <Alias><client name 2>.<server name>.com</Alias>
  <Alias><client name 3>.<server name>.com</Alias>
  ...etc for each of our clients...
</Host>

to the following:

<Host name="localhost" appBase="webapps">
 <Context path="/app" >
 </Context>
</Host>

And Tomcat is working great.


Finally, for the questions about the static content. We're actually going to have the application managing the content, because in most cases (except for logs and some pictures) the users must be logged into the application to have access to any content. We will most like be able to use a dynamically created directory structure for this purpose.


Thanks again for everyones replies and time.




----Original Message Follows----
From: "Johnny Kewl" <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <users@tomcat.apache.org>
To: "Tomcat Users List" <users@tomcat.apache.org>
Subject: Re: Dynamic URIs Using one Context
Date: Wed, 16 May 2007 11:24:31 +0200


These sort of things.... http://www.mycompany.com/~craigmcc/index.htm
Yes.... nice I think for static sites and letting people ftp in... normal kinda thing a sp provides.... but I think these guys are trying to cater for power tomcat users.

Probably provide things like MySQL and Postgresql facilities etc... and then I think as you said... the static type stuff will break down... still, also nice for the user that can make an html file but doesnt know wot tomcat is... why not.... may be nice for a user that has several web apps... can have an index page to all his webapps... maybe... but sp will probably have a page that does that on their ROOT app...

Company A

LinkToEmployeeWebApp
LinkToFreeServicesWebApp

Company B

etc etc

if anything to promote the SP and get it to pick up in google.... more hits etc....

.... fascinating stuff coz its as much about the biz as it is about tomcat...

----- Original Message ----- From: "Raghupathy, Gurumoorthy" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Wednesday, May 16, 2007 10:53 AM
Subject: RE: Dynamic URIs Using one Context


You can use
http://httpd.apache.org/docs/2.0/mod/mod_userdir.html and
http://tomcat.apache.org/tomcat-5.5-doc/config/host.html  ( User Web App
) in conjunction with a mod_rewrite and proxy ...... Not simple but
achievable .... :)


Regards
Guru



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

_________________________________________________________________
Like the way Microsoft Office Outlook works? You’ll love Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_outlook_0507


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to