You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Randy Paries <ra...@unitnet.com> on 2005/07/27 20:26:33 UTC
Help with setting up aliases , it kind of works , but the getRealPath does not
Hello
I will try to be brief
I am running apache 2, tomcat 5
I currently have this configuration
/home/topdomain = www.topdomain.com
/home/topdomain/subdomain1 = sub1.topdomain.com
/home/topdomain/subdomain2 = sub2.topdomain.com
under each subdomain i have users. ie
/home/topdomain/subdomain1/usera = http://sub1.topdomain.com/usera
So this kind of works. All these subdomains, (I will actually have 5) all
share the exact code, and i really do not
want to have 5 exact instances of this running.
The problem i am seeing getrealPath problems. For example, when i allow the
user to upload a file, i take his virt dir and do a getrealPath to get the
real physical path so i can upload it to the correct place. So if i am usera
on b1.topdomain.com
and do a String realRPPath = application.getRealPath("/"+user.getDir());
I get /home/topdomain/usera and not /home/topdomain/subdomain1/usera
I hope this makes sense
in my server.xml i have
<Host name="www.topdomain.com <http://www.topdomain.com/> "
debug="0" appBase="/home/topdomain" unpackWARs="true">
<Alias>sub1.topdomain.com</Alias>
<Alias>sub2.topdomain.com</Alias>
</Host>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org