Re: how to replace apache's mod_alias
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dennis, On 10/13/2009 11:30 AM, Dennis Christopher wrote: Is there any documentation on how to replace the alias elements in httpd.conf with corresponding elements in Tomcat's configuration? Not directly. But if you describe what you want to do, maybe we can help. I recommend looking at http://tuckey.org/urlrewrite/ which is likely to be the tool that provides a solution for you. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrXNLsACgkQ9CaO5/Lv0PAaZQCbBt9PQEJS/NAK9gz7y//XSp57 MNYAoL9/iIyVb1KHqRV66SACmEui7siY =R0vG -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: how to replace apache's mod_alias
Thanks for the reply Chris. what I want to do: I am running Tomcat as a standalone server on OSX. My application had been previously set up with apache serving in front of Tomcat. My application is a context element '/myapp' accessed via server address/myapp. Within the app's jsps are references to files in a folder 'myapp-web' whose real location on the server file system is outside the tomcat tree. I am unclear whether these references are actually supported in the previous version via mod_alias or a symbolic link created for /library/webserver/documents. Tomcat the definitive guide says that if allowLinking in the myapp context is true that it should work, but so far it has not worked for me. Dennis On Oct 15, 2009, at 10:42 AM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dennis, On 10/13/2009 11:30 AM, Dennis Christopher wrote: Is there any documentation on how to replace the alias elements in httpd.conf with corresponding elements in Tomcat's configuration? Not directly. But if you describe what you want to do, maybe we can help. I recommend looking at http://tuckey.org/urlrewrite/ which is likely to be the tool that provides a solution for you. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrXNLsACgkQ9CaO5/Lv0PAaZQCbBt9PQEJS/NAK9gz7y//XSp57 MNYAoL9/iIyVb1KHqRV66SACmEui7siY =R0vG -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: how to replace apache's mod_alias
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dennis, On 10/15/2009 11:15 AM, Dennis Christopher wrote: My application is a context element '/myapp' accessed via server address/myapp. Within the app's jsps are references to files in a folder 'myapp-web' whose real location on the server file system is outside the tomcat tree. So, the URLs for these resources are something like http://host/myapp-web/path/to/file? Are they all rooted in the same place? If so, you can basically create a dummy webapp that contains nothing but your files, served out of the location of your choice. Create a file under CATALINA_BASE/conf/[service]/[host]/myapp-web.xml that contains the following: Context appBase=/library/webserver/documents / This will deploy a new web application (into /myapp-web) that serves static documents from /library/webserver/documents. This is the equivalent of Apache httpd's: Alias /myapp-web /library/webserver/documents It probably seems a little heavy-handed, but it's because app servers are app-centric, not file/directory centric. Hope that helps, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrXPw0ACgkQ9CaO5/Lv0PCE4wCfcZdrk0+0iolmGauFLZDiT5TX xdAAnA6+SyfnqfYirdcIaMWYy8Hrm12s =c97v -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: how to replace apache's mod_alias
Chris, the user accesses my jsps via http://host/my-app. The jsps include references of the form below, as request dumper valve tells me: /myapp-web/styles/images/mylogo.jsp where myapp-web is a directory elsewhere on the system. so the full path reference style is never done as such. Dennis On Oct 15, 2009, at 11:26 AM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dennis, On 10/15/2009 11:15 AM, Dennis Christopher wrote: My application is a context element '/myapp' accessed via server address/myapp. Within the app's jsps are references to files in a folder 'myapp-web' whose real location on the server file system is outside the tomcat tree. So, the URLs for these resources are something like http://host/myapp-web/path/to/file? Are they all rooted in the same place? If so, you can basically create a dummy webapp that contains nothing but your files, served out of the location of your choice. Create a file under CATALINA_BASE/conf/[service]/[host]/myapp-web.xml that contains the following: Context appBase=/library/webserver/documents / This will deploy a new web application (into /myapp-web) that serves static documents from /library/webserver/documents. This is the equivalent of Apache httpd's: Alias /myapp-web /library/webserver/documents It probably seems a little heavy-handed, but it's because app servers are app-centric, not file/directory centric. Hope that helps, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrXPw0ACgkQ9CaO5/Lv0PCE4wCfcZdrk0+0iolmGauFLZDiT5TX xdAAnA6+SyfnqfYirdcIaMWYy8Hrm12s =c97v -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: how to replace apache's mod_alias
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dennis, (No need to CC me directly at all; I get all the messages through the mailing list). On 10/15/2009 12:03 PM, Dennis Christopher wrote: the user accesses my jsps via http://host/my-app. The jsps include references of the form below, as request dumper valve tells me: /myapp-web/styles/images/mylogo.jsp where myapp-web is a directory elsewhere on the system. so the full path reference style is never done as such. No problem: the technique I mentioned will work exactly the same way. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrXTAoACgkQ9CaO5/Lv0PC3VgCfQB1QumOe6Zjh9XcV1KOFK6D5 5R4AoICn/Ox7ES83wRyotVSbBRhfu4Ue =eNN3 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: how to replace apache's mod_alias
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: how to replace apache's mod_alias Create a file under CATALINA_BASE/conf/[service]/[host]/myapp-web.xml that contains the following: Context appBase=/library/webserver/documents / That should be docBase, not appBase. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
Re: how to replace apache's mod_alias
Hmm. I thought that correction would make it work, but still no go. I don't have any structure under conf, and usually add contexts in server.xml . I tried this first, giving path=/myapp-web. But this didnt work. It seems by the logic of what we are trying, i.e. making the docBase = /library/webserver/documents', that my images, e.g won't be reachable unless the symbolic link in the docBase is valid as well. It looks like it is, but just in case, I tried putting the absolute path into the docBase as well. No go either. Next, and maybe I didnt follow directions properly, I added the directory conf/localhost which then contained myapp-web.xml with the (pathless) context below. Tried this also with the absolute path and still no joy. Dennis On Oct 15, 2009, at 1:07 PM, Caldarale, Charles R wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: how to replace apache's mod_alias Create a file under CATALINA_BASE/conf/[service]/[host]/myapp-web.xml that contains the following: Context appBase=/library/webserver/documents / That should be docBase, not appBase. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: how to replace apache's mod_alias
From: Dennis Christopher [mailto:dchristop...@pixion.com] Subject: Re: how to replace apache's mod_alias Next, and maybe I didnt follow directions properly, I added the directory conf/localhost which then contained myapp-web.xml with the (pathless) context below. Close, but that needs to be conf/Catalina/localhost/myapp-web.xml. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: how to replace apache's mod_alias
Thanks Charles and Chris -- that works! Dennis On Oct 15, 2009, at 2:06 PM, Caldarale, Charles R wrote: From: Dennis Christopher [mailto:dchristop...@pixion.com] Subject: Re: how to replace apache's mod_alias Next, and maybe I didnt follow directions properly, I added the directory conf/localhost which then contained myapp-web.xml with the (pathless) context below. Close, but that needs to be conf/Catalina/localhost/myapp-web.xml. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: how to replace apache's mod_alias
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 10/15/2009 1:07 PM, Caldarale, Charles R wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: how to replace apache's mod_alias Create a file under CATALINA_BASE/conf/[service]/[host]/myapp-web.xml that contains the following: Context appBase=/library/webserver/documents / That should be docBase, not appBase. Crap, I even checked the docs just to be sure, and then typed the wrong one. Auto-pilot hands have irreparably ruined my reputation again :( - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrXh1MACgkQ9CaO5/Lv0PDyIACbBp5kX8gJpGG+T7WfCwy9mSgv OycAn2/vqYCzlgXRdhIy/GqZmA5qXBUQ =4jlV -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
how to replace apache's mod_alias
environment: Tomcat 6.0.18 under apache2 on Mac OS X Server 10.6 (Snow Leopard). I have a web app that works under Tomcat with Apache as the front end. I have had issues with the Apache-Tomcat connectors and am trying to set up the app to be served directly by Tomcat, listening on port 80. This is working to a point, but I have some functionality that depends on accessing directories within the document base, and that was handled previously my Mod_Alias in apache. Is there any documentation on how to replace the alias elements in httpd.conf with corresponding elements in Tomcat's configuration? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org