Re: How does one configure Plain host domain url to run web app?
Folks, I found the solution and it was embarrassingly simple.. (an often occurrence..) All I had to do was set the DocumentRoot to where I wanted the index.html to be run from. (I found it when I was deleting all of the various test settings, Directory tags, Aliaes, redirects and left the DocumentRoot setting just for grins. I then tested the site to see if the webapps were still working but quickly tried the domain root.. what the heck.. it worked..!!!) So.. there you go.. John... - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How does one configure Plain host domain url to run web app?
Thank you for adding the Virtual Hosting how-to, and it is very nicely written too. I find it useful and easy to configure multiple apps in: $CATALINA_HOME/conf/Catalina/ren/ROOT.xml $CATALINA_HOME/conf/Catalina/stimpy/ROOT.xml rather than having the Context entries in server.xml , so now only the Hosts need to be configured in server.xml -Rashmi - Original Message From: Mark Thomas [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Friday, March 16, 2007 9:20:15 PM Subject: Re: How does one configure Plain host domain url to run web app? John Moore wrote: Thanks for any ideas or suggestions.. A how to has been added to the documentation. http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html Mark Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. http://videogames.yahoo.com/platform?platform=120121 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How does one configure Plain host domain url to run web app?
Rashmi Rubdi wrote: You are right, the set-up I've mentioned only works for one application. Perhaps you want to configure multiple virtual hosts. I already use virtual hosts.. There's an example on that here: http://confluence.atlassian.com/display/DOC/Guide+to+using+Apache+Tomcat's+Virtual+Hosts Interesting but.. I already do that, as best as I can tell.. You won't need Apache HTTP connector, just Tomcat is fine I think (not sure). My understanding is that Tomcat by itself is not nearly as a robust and HTTP service.. At least that is what I used to hear, both here and in many other postings and books.. because the above configuration uses name-based virtual hosting, you need to have entries in your DNS server for app1 and app2 that point to the application server .. yes I also do that already.. The problem I'm having is that a java web app is generally called via a context Since there are MANY webapps in the system I can place a single webapp in the root.. therefore how do I map a single host.domain to a virtual host.. Currently I have http://www.mydomain.com/mysite/thecontext ..where mysite is a sub-directory under webapps and thecontext is the context of that web application using JkMount I would like to configure it so that.. http://www.mydomain.com ..also brings up that same webapp.. Make sense..??? I can currently do this by mapping http://www.mydomain.com to an Apache Htdocs virtual host service with a redirect to.. http://otherhost.mydomain.com/mysite/thecontext ..where otherhost is a DNS entry for that domain of which there is also a virtual host in Tomcat. I was hopping I did not have to do this convolluted system, as it is easy to forget what is happening and someone (employee) could easily mess it up.. Is that clearer now..?? Thanks for any ideas or suggestions.. John.. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How does one configure Plain host domain url to run web app?
John Moore wrote: Thanks for any ideas or suggestions.. A how to has been added to the documentation. http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How does one configure Plain host domain url to run web app?
ajp13 JkMount /jsp-examples/servletToJsp ajp13 JkMount /jsp-examples/tagplugin/if.jsp ajp13 JkMount /jsp-examples/cal/cal1.jsp ajp13 JkMount /jsp-examples/jsp2/tagfiles/hello.jsp ajp13 JkMount /jsp-examples/jsptoserv/hello.jsp ajp13 JkMount /jsp-examples/jsp2/misc/dynamicattrs.jsp ajp13 JkMount /jsp-examples/security/protected/error.jsp ajp13 JkMount /jsp-examples/jsp2/el/implicit-objects.jsp ajp13 THEN in a apache add # I added this for jk connector jk is auto gen by tomcat== Include D:/DEV/Tomcat 5.5/conf/auto/mod_jk.conf Apache will use Tomcat and the servlet configuaration in Tomcat. DONE! Now even for load balancing I remove the Apache include but still leave the Autogeneration in tomcat because Tomcat generates the code and I can just copy and paste. You'll find you can do anything and you should be able to because its a simple MVC model. Now you going to tell me you have used Struts or Spring or something. oh well, guess you'll have to ask the framework gods this is so easy I really cant understand why people use that stuff. Hope this helps Good luck. - Original Message - From: John Moore [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, March 13, 2007 3:28 AM Subject: How does one configure Plain host domain url to run web app? (Tomcat 4.x) I have the following url that runs an application (pseudo url for discussion only) http://www.mydomain.com/mysite/thecontext works fine.. I would like to configure it so that.. http://www.mydomain.com gets me to the same place.. I can place a redirect html page at http://www.mydomain.com/mysite/index.html which redirects to http://www.mydomain.com/mysite/thecontext but have yet to get a plain http://www.mydomain.com to work.. I keep getting either the No Context configured. error or the dreaded index of the directory.. I've tried Aliaes, Document root, Directory, and various JkMount settings in the Virtual host conf file that seemed like it might work, but so far, no joy.. (Tried Googling it, but have not come up with the right key words..) Some of the things I have tried in the conf file.. == Alias /mysite usr/tomcat/webapps/mysite Alias / usr/tomcat/webapps/mysite DocumentRoot /usr/local/tomcat/webapps/mysite/ Directory /usr/local/tomcat/webapps/mysite Options Indexes FollowSymLinks DirectoryIndex index.html index.htm index.jsp /Directory JkMount /mysite/thecontext ajp13 JkMount /mysite/*.jsp ajp13 ..variations of.. JkMount /*.jsp ajp13 -- gives me a dreaded index of the correct directory JkMount /*.html ajp13 -- same as above JkMount /*. ajp13 -- blank document (strange) JkMount /* ajp13 -- context error - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How does one configure Plain host domain url to run web app?
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Subject: Re: How does one configure Plain host domain url to run web app? Dont use a redirect... it goes back to the browser and its not cool. Nothing wrong with redirects. They're quite appropriate to allow the browser to properly evaluate relative links in pages without the need for the extra gyrations you're suggesting. Firstly make a servlet and have a look at the CONTEXT.XML file under META-INF Now have a look at WEB.XML under WEB-INF Watch out for case sensitivity here; both context.xml and web.xml must be lower-case file names. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How does one configure Plain host domain url to run web app?
Rashmi Rubdi wrote: I think an application runs on the root context / by default, if it's configured this way in server.xml : Engine name=Catalina defaultHost=localhost Host name=localhost appBase=webapps/projectname Context path= docBase=C:\dev\projects\projectname reloadable=true / Logger className=org.apache.catalina.logger.FileLogger/ /Host /Engine Thanks for replying.. I have that already and it does not help.. Other suggestions..?? John.. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How does one configure Plain host domain url to run web app?
[EMAIL PROTECTED] wrote: Hi John, Ok, I'm going to try show you how I think about this stuff... and I'm often wrong ;) Dont use a redirect... it goes back to the browser and its not cool. Firstly make a servlet and have a look at the CONTEXT.XML file under META-INF Thank you for taking the time to explain your idea.. I actually often do it another way.. I create another host for the webapp and then place the plain domain www.mydomain.com as an Apache HTdocs and then redirect to the webapp host.. Problem with this an your solution is that is it messy.. We serve a LOT of webapps and need to keep it as simple as possible.. I will study your idea and see if it can help me on finding a cleaner solution.. John.. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How does one configure Plain host domain url to run web app?
Caldarale, Charles R wrote: From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Subject: Re: How does one configure Plain host domain url to run web app? Dont use a redirect... it goes back to the browser and its not cool. Nothing wrong with redirects. They're quite appropriate to allow the browser to properly evaluate relative links in pages without the need for the extra gyrations you're suggesting. I agree... Do you have any thoughts on a solution... John..
Re: How does one configure Plain host domain url to run web app?
If you place your application as ROOT.war , directly under Tomcat's webapps folder then Tomcat should load it on the root context / But if it's named anything else then it will be at the /ProjectName/ context. I have mine set-up like this on a clean install of Tomcat 5.5 (with no additional configuration) and the web application loads on the root context. If you place an index.jsp directly in the root folder of your project then, that takes care of hiding the directory listing and rendering the home page of your app. Also configure welcome-file in your project's web.xml to index.jsp -Rashmi - Original Message From: John Moore [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, March 13, 2007 4:12:48 PM Subject: Re: How does one configure Plain host domain url to run web app? Rashmi Rubdi wrote: I think an application runs on the root context / by default, if it's configured this way in server.xml : Engine name=Catalina defaultHost=localhost Host name=localhost appBase=webapps/projectname Context path= docBase=C:\dev\projects\projectname reloadable=true / Logger className=org.apache.catalina.logger.FileLogger/ /Host /Engine Thanks for replying.. I have that already and it does not help.. Other suggestions..?? John.. 8:00? 8:25? 8:40? Find a flick in no time with the Yahoo! Search movie showtime shortcut. http://tools.search.yahoo.com/shortcuts/#news - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How does one configure Plain host domain url to run web app?
On 3/13/07, John Moore [EMAIL PROTECTED] wrote: Problem with this an your solution is that is it messy.. Front-ending Tomcat with Apache is messy :-) If you *must* use Apache for whatever reason, you'd be better off using mod_proxy_ajp in conjunction with mod_rewrite to handle this configuration. FWIW, -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How does one configure Plain host domain url to run web app?
Hassan Schroeder wrote: On 3/13/07, John Moore [EMAIL PROTECTED] wrote: Problem with this an your solution is that is it messy.. Front-ending Tomcat with Apache is messy :-) Really.. Why.. ?? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How does one configure Plain host domain url to run web app?
Thank you for replying.. This is one webapp among many on this server.. So if I understand you correctly this will not be possible.. If I have miss understood.. could you clarify..?? John.. Rashmi Rubdi wrote: If you place your application as ROOT.war , directly under Tomcat's webapps folder then Tomcat should load it on the root context / But if it's named anything else then it will be at the /ProjectName/ context. I have mine set-up like this on a clean install of Tomcat 5.5 (with no additional configuration) and the web application loads on the root context. If you place an index.jsp directly in the root folder of your project then, that takes care of hiding the directory listing and rendering the home page of your app. Also configure welcome-file in your project's web.xml to index.jsp - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How does one configure Plain host domain url to run web app?
On 3/13/07, John Moore [EMAIL PROTECTED] wrote: Front-ending Tomcat with Apache is messy :-) Really.. Why.. ?? By which I meant, httpd is an extraneous complication, unless you really need to have something like PHP or other service outside of Tomcat. Do you? If that's the case, mod_proxy_ajp is far simpler to configure than mod_jk. But if not, simplify your life :-) -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How does one configure Plain host domain url to run web app?
You are right, the set-up I've mentioned only works for one application. Perhaps you want to configure multiple virtual hosts. There's an example on that here: http://confluence.atlassian.com/display/DOC/Guide+to+using+Apache+Tomcat's+Virtual+Hosts You won't need Apache HTTP connector, just Tomcat is fine I think (not sure). On MS Windows , configure the hosts in the C:\WINDOWS\system32\drivers\etc\hosts , by adding this line: 127.0.0.1 pebble practice Then configure these two apps in server.xml , as: Engine name=Catalina defaultHost=pebble Host name=pebble appBase=webapps/pebble Context path= docBase=C:/dev/projects/pebble reloadable=true / Logger className=org.apache.catalina.logger.FileLogger/ /Host Host name=practice appBase=webapps/practice Context path= docBase=C:/dev/projects/practice reloadable=true / Logger className=org.apache.catalina.logger.FileLogger/ /Host /Engine Then you'll be able to call 2 different applications on the root context , for example http://pebble:8080/ and http://practice:8080/ , you might be able to do something similiar on Unix, and also might be able to change the port to 80 , from 8080. I give credit to Hassan for explaining the above configuration to me a few months ago. Over here http://confluence.atlassian.com/display/DOC/Guide+to+using+Apache+Tomcat's+Virtual+Hosts it also says because the above configuration uses name-based virtual hosting, you need to have entries in your DNS server for app1 and app2 that point to the application server -Rashmi - Original Message From: John Moore [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, March 13, 2007 7:41:40 PM Subject: Re: How does one configure Plain host domain url to run web app? Thank you for replying.. This is one webapp among many on this server.. So if I understand you correctly this will not be possible.. If I have miss understood.. could you clarify..?? John.. Rashmi Rubdi wrote: If you place your application as ROOT.war , directly under Tomcat's webapps folder then Tomcat should load it on the root context / But if it's named anything else then it will be at the /ProjectName/ context. I have mine set-up like this on a clean install of Tomcat 5.5 (with no additional configuration) and the web application loads on the root context. If you place an index.jsp directly in the root folder of your project then, that takes care of hiding the directory listing and rendering the home page of your app. Also configure welcome-file in your project's web.xml to index.jsp - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 8:00? 8:25? 8:40? Find a flick in no time with the Yahoo! Search movie showtime shortcut. http://tools.search.yahoo.com/shortcuts/#news - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How does one configure Plain host domain url to run web app?
(Tomcat 4.x) I have the following url that runs an application (pseudo url for discussion only) http://www.mydomain.com/mysite/thecontext works fine.. I would like to configure it so that.. http://www.mydomain.com gets me to the same place.. I can place a redirect html page at http://www.mydomain.com/mysite/index.html which redirects to http://www.mydomain.com/mysite/thecontext but have yet to get a plain http://www.mydomain.com to work.. I keep getting either the No Context configured. error or the dreaded index of the directory.. I've tried Aliaes, Document root, Directory, and various JkMount settings in the Virtual host conf file that seemed like it might work, but so far, no joy.. (Tried Googling it, but have not come up with the right key words..) Some of the things I have tried in the conf file.. == Alias /mysite usr/tomcat/webapps/mysite Alias / usr/tomcat/webapps/mysite DocumentRoot /usr/local/tomcat/webapps/mysite/ Directory /usr/local/tomcat/webapps/mysite Options Indexes FollowSymLinks DirectoryIndex index.html index.htm index.jsp /Directory JkMount /mysite/thecontext ajp13 JkMount /mysite/*.jsp ajp13 ..variations of.. JkMount /*.jsp ajp13 -- gives me a dreaded index of the correct directory JkMount /*.html ajp13 -- same as above JkMount /*. ajp13 -- blank document (strange) JkMount /* ajp13 -- context error = Suggestions appreciated.. (all of my other machines are running Tomcat 5.. I will be moving this app next month.. so a Tomcat 5 suggestion would be welcome as well) John.. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How does one configure Plain host domain url to run web app?
I think an application runs on the root context / by default, if it's configured this way in server.xml : Engine name=Catalina defaultHost=localhost Host name=localhost appBase=webapps/projectname Context path= docBase=C:\dev\projects\projectname reloadable=true / Logger className=org.apache.catalina.logger.FileLogger/ /Host /Engine server.xml is located at : ..\apache-tomcat-5.x\conf\ On Windows XP , you can try something similar in Unix. -Rashmi - Original Message From: John Moore [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Monday, March 12, 2007 9:28:59 PM Subject: How does one configure Plain host domain url to run web app? (Tomcat 4.x) I have the following url that runs an application (pseudo url for discussion only) http://www.mydomain.com/mysite/thecontext works fine.. I would like to configure it so that.. http://www.mydomain.com gets me to the same place.. I can place a redirect html page at http://www.mydomain.com/mysite/index.html which redirects to http://www.mydomain.com/mysite/thecontext but have yet to get a plain http://www.mydomain.com to work.. I keep getting either the No Context configured. error or the dreaded index of the directory.. I've tried Aliaes, Document root, Directory, and various JkMount settings in the Virtual host conf file that seemed like it might work, but so far, no joy.. (Tried Googling it, but have not come up with the right key words..) Some of the things I have tried in the conf file.. == Alias /mysite usr/tomcat/webapps/mysite Alias / usr/tomcat/webapps/mysite DocumentRoot /usr/local/tomcat/webapps/mysite/ Directory /usr/local/tomcat/webapps/mysite Options Indexes FollowSymLinks DirectoryIndex index.html index.htm index.jsp /Directory JkMount /mysite/thecontext ajp13 JkMount /mysite/*.jsp ajp13 ..variations of.. JkMount /*.jsp ajp13 -- gives me a dreaded index of the correct directory JkMount /*.html ajp13 -- same as above JkMount /*. ajp13 -- blank document (strange) JkMount /* ajp13 -- context error = Suggestions appreciated.. (all of my other machines are running Tomcat 5.. I will be moving this app next month.. so a Tomcat 5 suggestion would be welcome as well) John.. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Don't pick lemons. See all the new 2007 cars at Yahoo! Autos. http://autos.yahoo.com/new_cars.html - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]