shivaji_nimase
asked on
How can I configure TOMCAT web server
Hello,
I need to know the configuration for TOMCAT webserver. We have installed SAP BOBJ KA and now we have to give the access to KA users. I have a SAP procedure to configure IIS and Apache web server. Those processes are processes are given below at point C and D. I would like to have similar process for TOMCAT webserver.
Thank you,
Shivaji
A. Access installed KA: Navigate to the folder where you installed the SAP Knowledge Acceleration, website package, and click on the index.htm file.
B. Create Access Point Create a link to the index.htm file from an existing website. or Create a standalone index.htm page. or Create a virtual directory on the web server.
C. Configure IIS
1. Add a new virtual directory to the website and name it as required.
2. Enter the path to the location where you installed SAP Knowledge Acceleration (**.msi).
3. Set access permissions to the virtual directory (read and run required)
4. Set the default start page of the directory to be index.htm
For Example: SAP Knowledge Acceleration should now be accessible via the address
http://machinename/KA
D. Configure Apache Web Server
1. Stop the Apache server
2. Add the following into the httpd.conf file within the Apache/Conf directory:
Alias /ka/ "C:/KA/"
<Directory "C:/KA">
Options Indexes FollowSymLinks
</Directory>
Note: The path in this example is C:/KA. Modify this path to point to the location where you
have installed SAP Knowledge Acceleration.
3. Find the following line in the httpd.conf file: “DirectoryIndex index.htmldefault.html and
change this to read “DirectoryIndex index.html”.
4. Save changes and restart Apache.
I need to know the configuration for TOMCAT webserver. We have installed SAP BOBJ KA and now we have to give the access to KA users. I have a SAP procedure to configure IIS and Apache web server. Those processes are processes are given below at point C and D. I would like to have similar process for TOMCAT webserver.
Thank you,
Shivaji
A. Access installed KA: Navigate to the folder where you installed the SAP Knowledge Acceleration, website package, and click on the index.htm file.
B. Create Access Point Create a link to the index.htm file from an existing website. or Create a standalone index.htm page. or Create a virtual directory on the web server.
C. Configure IIS
1. Add a new virtual directory to the website and name it as required.
2. Enter the path to the location where you installed SAP Knowledge Acceleration (**.msi).
3. Set access permissions to the virtual directory (read and run required)
4. Set the default start page of the directory to be index.htm
For Example: SAP Knowledge Acceleration should now be accessible via the address
http://machinename/KA
D. Configure Apache Web Server
1. Stop the Apache server
2. Add the following into the httpd.conf file within the Apache/Conf directory:
Alias /ka/ "C:/KA/"
<Directory "C:/KA">
Options Indexes FollowSymLinks
</Directory>
Note: The path in this example is C:/KA. Modify this path to point to the location where you
have installed SAP Knowledge Acceleration.
3. Find the following line in the httpd.conf file: “DirectoryIndex index.htmldefault.html and
change this to read “DirectoryIndex index.html”.
4. Save changes and restart Apache.
ASKER
Its standalone
What do you mean by "Its standalone"?
ASKER
In my case Tomcat is the webserver. I am not connecting it to IIS or Apache. My instructions in original question were a example for IIS and Apache web server. I do not have instructions for Tomcat webserver. I am looking for similar instructions for Tomcat web server
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hello,
We have tomcat 5.5. Are these instructions still applicable to 5.5? Thank you for your time and help.
Thanks,
Shivaji
We have tomcat 5.5. Are these instructions still applicable to 5.5? Thank you for your time and help.
Thanks,
Shivaji
Did you try it?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I could not try this solution as I am done with that assignment. But I may try this in future.
ASKER
Hello,
I tried this solution but it does not work. Below are the lines I added to server.xml and restarted the tomcat web server. When I go to "www.suwebbidevka.com" it does not work.
Thank you,
Shivaji
<!-- ===== Virtual Host SAPKA.com ========================-- >
<Host name="www.suwebbidevka.com" appBase="C:/BusinessObject s/website/ KA_Crystal _Reports/i ndex.html"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Valve className="org.apache.cata lina.valve s.FastComm onAccessLo gValve"
directory="logs" prefix="SAPKA_access_log." suffix=".log"
pattern="common" resolveHosts="false"/>
<Context path="/" docBase="C:/BusinessObject s/website/ KA_Crystal _Reports/i ndex.html" debug="0" privileged="true" />
</Host>
-------------------
Even I tried with removing "/index.html" from the path but still does not work.
I tried this solution but it does not work. Below are the lines I added to server.xml and restarted the tomcat web server. When I go to "www.suwebbidevka.com" it does not work.
Thank you,
Shivaji
<!-- ===== Virtual Host SAPKA.com ========================--
<Host name="www.suwebbidevka.com" appBase="C:/BusinessObject
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Valve className="org.apache.cata
directory="logs" prefix="SAPKA_access_log."
pattern="common" resolveHosts="false"/>
<Context path="/" docBase="C:/BusinessObject
</Host>
-------------------
Even I tried with removing "/index.html" from the path but still does not work.
We need more info than "does not work." What is the line in your access log for the access? That will tell us the url you actually put in, and what the server response code was.
One problem is that you did not put in the correct docBase or appBase. You should look at the Tomcat documentation to understand what you are configuring here.
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
Your initial question said that the physical top level directory for your app was C:/KA , which is why I used that directory in my answer. The docBase and appBase values are the top level directories for your web app. They are not the files themselves. So if the top level directory of you webapp is really
C:/BusinessObjects/website /KA_Crysta l_Reports
then that is what you should put for docbase and appbase.
It seems more likely that your top level directory is
C:/BusinessObjects/website
and the url would then be
http://www.suwebbidevka.com/KA_Crystal_Reports/index.html
but you'll have to look at your own webapp to determine the right values.
One problem is that you did not put in the correct docBase or appBase. You should look at the Tomcat documentation to understand what you are configuring here.
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
Your initial question said that the physical top level directory for your app was C:/KA , which is why I used that directory in my answer. The docBase and appBase values are the top level directories for your web app. They are not the files themselves. So if the top level directory of you webapp is really
C:/BusinessObjects/website
then that is what you should put for docbase and appbase.
It seems more likely that your top level directory is
C:/BusinessObjects/website
and the url would then be
http://www.suwebbidevka.com/KA_Crystal_Reports/index.html
but you'll have to look at your own webapp to determine the right values.
ASKER
There is nothing in the access log. I can see the file SAPKA_access_log.2011-03-1 0 in log directory but that is empty.
Also when I type the URL it says Internet Explorer cannot display the webpage.
Please let me know if there are any more details which I can provide to troubleshoot the issue.
Also when I type the URL it says Internet Explorer cannot display the webpage.
Please let me know if there are any more details which I can provide to troubleshoot the issue.
Did you make the change I explained to your appbase and docbase? That is one step you could do.
Check all the access logs for the server. Your requests must be going somewhere.
Check all the access logs for the server. Your requests must be going somewhere.
ASKER
Yes, I did make the change to appbase and docbase.
And what happened?
ASKER
Those changes were done before my previous message. So even after those changes IE cannot display the page.
Okay, then try to post more information.
1) find the access log for your Web server which contains the accesses you are trying to make. Look at all of them, since you aren't finding the access in the log file you expect. If that fails, then post the exact string that you have in your browser's location bar. That won't give us the response code, but it will give us the full url.
or
1a) use Firefox, and get the LiveHttpHeaders plugin. This is to try to deal with the fact that you can't find the access logs for your server. LiveHttpHeaders will show you what your browser is sending to the server, and what the server is responding. That will give us the response code, and the actual urls being received by the server.
2) Post the changed section of server.xml -- perhaps there are other errors.
3) Look in the various server logs for your server for other indications of what it is receiving and responding to. Look in catalina.log, stdout.log, stderr.log -- anything which might help track down your problem.
And always post more information. The experts don't see what you've responded until everything gets emailed out. The more information you put in your posts, the fewer times we have to wait for a round of posts and emails to get more information.
1) find the access log for your Web server which contains the accesses you are trying to make. Look at all of them, since you aren't finding the access in the log file you expect. If that fails, then post the exact string that you have in your browser's location bar. That won't give us the response code, but it will give us the full url.
or
1a) use Firefox, and get the LiveHttpHeaders plugin. This is to try to deal with the fact that you can't find the access logs for your server. LiveHttpHeaders will show you what your browser is sending to the server, and what the server is responding. That will give us the response code, and the actual urls being received by the server.
2) Post the changed section of server.xml -- perhaps there are other errors.
3) Look in the various server logs for your server for other indications of what it is receiving and responding to. Look in catalina.log, stdout.log, stderr.log -- anything which might help track down your problem.
And always post more information. The experts don't see what you've responded until everything gets emailed out. The more information you put in your posts, the fewer times we have to wait for a round of posts and emails to get more information.
ASKER
Here is the added section of server.xml file
<!-- ===== Virtual Host SAPKA.com ========================-- >
<Host name="www.suwebbidevka.com" appBase="C:/BusinessObject s/website"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Valve className="org.apache.cata lina.valve s.FastComm onAccessLo gValve"
directory="logs" prefix="SAPKA_access_log." suffix=".log"
pattern="common" resolveHosts="false"/>
<Context path="/" docBase="C:/BusinessObject s/website" debug="0" privileged="true" />
</Host>
I have added the complete server.xml file and screenshot of error.
server.xml
shivaji-nimase-423124.flv
<!-- ===== Virtual Host SAPKA.com ========================--
<Host name="www.suwebbidevka.com" appBase="C:/BusinessObject
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Valve className="org.apache.cata
directory="logs" prefix="SAPKA_access_log."
pattern="common" resolveHosts="false"/>
<Context path="/" docBase="C:/BusinessObject
</Host>
I have added the complete server.xml file and screenshot of error.
server.xml
shivaji-nimase-423124.flv
Okay, that's a different problem (in your video). Your server is not available through DNS. It's not the webapp or the pages, at least not yet.
Do you know for a fact that your domain name has been put in a DNS server or defined in some other way?
If you are working locally, on your own machine, then the way you test is to put the domain name in your Windows hosts file (on Unix, also the hosts file, but in a different location). For example, in the C:\WINDOWS\system32\driver s\etc\host s file, you would add a line like this:
127.0.0.1 www.suwebbidevka.com
Have you ever been able to reach the domain name you defined for this webapp? Have you ever been able to display any page from the server?
Do you know for a fact that your domain name has been put in a DNS server or defined in some other way?
If you are working locally, on your own machine, then the way you test is to put the domain name in your Windows hosts file (on Unix, also the hosts file, but in a different location). For example, in the C:\WINDOWS\system32\driver
127.0.0.1 www.suwebbidevka.com
Have you ever been able to reach the domain name you defined for this webapp? Have you ever been able to display any page from the server?
ASKER
I am working on the server directly. I have added the domain name in the hosts file as mentioned in your comment. I have restarted the server after this change. Still my server is not available through DNS. I was never able to reach the domain name I defined for this webapp.
You can't just access a domain name.
The way the Internet works is that a domain name is associated with an IP address. DNS servers hold the full directories of the domain names and their associated IP addresses. When you buy an IP address, and pay someone to assoicate your domain name with it, that makes it so that other users on the Internet can find your computer's IP address when your domain name is entered in the browser.
So, just because you put a domain name into a Tomcat configuration file does not mean that your browser knows that the domain name is associated with an IP address.
When you put the domain name with an IP address in your local hosts file, you are pretending to your computer that you have registered the domain name and associated it with an IP address.
What you put in your hosts file has to be correct for your machine in order for the fake-out to work. So if your machine is known to itself as 127.0.0.1, then that will work. Usually that is localhost, so it should be okay.
However, after you get the domain either really registered or faked with the hosts file, you have to get the port number right.
If you look at the Tomcat documentation, it clearly states that it is going to pot 8080. Unless you specify a port, on the Internet the default HTTP port (the one the browser uses) is 80. So in your case,
http://www.suwebbidevka.com
does not exist.
http://www.suwebbidevka.com:8080
does exist.
The way the Internet works is that a domain name is associated with an IP address. DNS servers hold the full directories of the domain names and their associated IP addresses. When you buy an IP address, and pay someone to assoicate your domain name with it, that makes it so that other users on the Internet can find your computer's IP address when your domain name is entered in the browser.
So, just because you put a domain name into a Tomcat configuration file does not mean that your browser knows that the domain name is associated with an IP address.
When you put the domain name with an IP address in your local hosts file, you are pretending to your computer that you have registered the domain name and associated it with an IP address.
What you put in your hosts file has to be correct for your machine in order for the fake-out to work. So if your machine is known to itself as 127.0.0.1, then that will work. Usually that is localhost, so it should be okay.
However, after you get the domain either really registered or faked with the hosts file, you have to get the port number right.
If you look at the Tomcat documentation, it clearly states that it is going to pot 8080. Unless you specify a port, on the Internet the default HTTP port (the one the browser uses) is 80. So in your case,
http://www.suwebbidevka.com
does not exist.
http://www.suwebbidevka.com:8080
does exist.
ASKER
Hello,
I was also thinking about the same thing. Thank you for the detailed explaination. That helps.
My server name should be suwebbidev and not suwebbidevka. I have made these changes. Now I get different error message as below:
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- -------
The connection was reset
The connection to the server was reset while the page was loading.
The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer's network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
Try Again
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- -------
I am attaching the screeshot as well.
Please let me know if you need any more information from my side.
Thank you,
Shivaji
shivaji-nimase-425592.flv
I was also thinking about the same thing. Thank you for the detailed explaination. That helps.
My server name should be suwebbidev and not suwebbidevka. I have made these changes. Now I get different error message as below:
--------------------------
The connection was reset
The connection to the server was reset while the page was loading.
The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer's network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
Try Again
--------------------------
I am attaching the screeshot as well.
Please let me know if you need any more information from my side.
Thank you,
Shivaji
shivaji-nimase-425592.flv
Now try putting the correct port number in. So:
http://www.suwebbidev.com:8080/[put your webabb dir here]
That is assuming many things of course. You have a domain name called suwebbidev.com . suwebbidev.com is a domain name that points to your machine. Port 8080 is open on your machine -- or you are running the browser on the same machine as Tomcat.
Is it possible that your company has a domain name called suwebbidev.com, and it already has a server for it? And you are adding a set of files? Is the suwebbidev.com on a different machine from the one you're working on?
http://www.suwebbidev.com:8080/[put your webabb dir here]
That is assuming many things of course. You have a domain name called suwebbidev.com . suwebbidev.com is a domain name that points to your machine. Port 8080 is open on your machine -- or you are running the browser on the same machine as Tomcat.
Is it possible that your company has a domain name called suwebbidev.com, and it already has a server for it? And you are adding a set of files? Is the suwebbidev.com on a different machine from the one you're working on?
ASKER
My machine name is suwebbidev or (suwebbidev.southernute.co m). domain name is southernute.com.
Here are the new entries from server.xml
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- -------
<Host name="www.suwebbidev.southernute.com" appBase="C:/BusinessObject s/website"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Valve className="org.apache.cata lina.valve s.FastComm onAccessLo gValve"
directory="logs" prefix="SAPKA_access_log." suffix=".log"
pattern="common" resolveHosts="false"/>
<Context path="/" docBase="C:/BusinessObject s/website" debug="0" privileged="true" />
</Host>
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- -------
Results of webpage are attached in the file.
Please let me know if you need more info.
Screenshots-Tomcat.docx
Here are the new entries from server.xml
--------------------------
<Host name="www.suwebbidev.southernute.com" appBase="C:/BusinessObject
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Valve className="org.apache.cata
directory="logs" prefix="SAPKA_access_log."
pattern="common" resolveHosts="false"/>
<Context path="/" docBase="C:/BusinessObject
</Host>
--------------------------
Results of webpage are attached in the file.
Please let me know if you need more info.
Screenshots-Tomcat.docx
Okay -- now things are getting somewhere. If you look in your access log, you should see that there's a 404 for the url you put in. If not, then there are still some configuration issues, so please check that.
When you get a 404, it means that the file does not exist at the path specified. So there would have to be a file at
C:/BusinessObjects/website /KA_Crysta l_Reports/ index.HTML
My guess would be that you have a file named index.html . Tomcat is case-sensitive, so even though Windows doesn't care, Tomcat does, and you have to get everything right, including case.
When you get a 404, it means that the file does not exist at the path specified. So there would have to be a file at
C:/BusinessObjects/website
My guess would be that you have a file named index.html . Tomcat is case-sensitive, so even though Windows doesn't care, Tomcat does, and you have to get everything right, including case.
ASKER
My file name is index.htm and I tired with that name but still no luck. When I tried this time there were no log messages. But my earlier try generated some log messages. I am attaching the log files. Please let me know if it gives any idea. jakarta-service-20110312.log
stdout.log
stdout.log
You need to post your access log.
Post the directory location of your file as well.
Post the directory location of your file as well.
ASKER
These logs are from logs directory under Tomcat55. Could you please let me know the location for access log?
When you put this line in your Host section of the server.xml file:
<Valve className="org.apache.cata lina.valve s.FastComm onAccessLo gValve"
directory="logs" prefix="SAPKA_access_log." suffix=".log"
pattern="common" resolveHosts="false"/>
it defines the location of the access log. Look there.
<Valve className="org.apache.cata
directory="logs" prefix="SAPKA_access_log."
pattern="common" resolveHosts="false"/>
it defines the location of the access log. Look there.
ASKER
Earlier logs are from the same directory. Access log was not updated during last try. There are two lines in access log for earlier time. I am attaching the access log now.
There are three more access log files for earlier days. Those are empty. I am attaching one of them.
SAPKA-access-log.2011-03-12.log
SAPKA-access-log.2011-03-11.log
There are three more access log files for earlier days. Those are empty. I am attaching one of them.
SAPKA-access-log.2011-03-12.log
SAPKA-access-log.2011-03-11.log
If you have entries in your SAPKA log file, then at that time your host declaration and IP address setup were successful. You just put in the wrong path to a file -- hence the 404.
So you need to look at your server.xml and possibly your hosts file and make sure that they are working correctly. You know that you have to bounce Tomcat every time you make a change to server.xml, right?
So you need to look at your server.xml and possibly your hosts file and make sure that they are working correctly. You know that you have to bounce Tomcat every time you make a change to server.xml, right?
ASKER
Yes, I am bouncing tomcat server after every change. I would take a look at server.xml file in detail. Thank you..
Remember:
1) the host name has to resolve either with a real DNS host name, or with the name you put in your hosts file
2) the port has to be 8080 if that is what you have as the port in your server.xml file
3) you have to spell the path to your file and your file name correctly, including case.
I'm not sure where you are with your host name, but a legitimate url for your file should be something like:
http://www.suwebbidev.southernute.com:8080/KA_Crystal_Reports/index.htm
1) the host name has to resolve either with a real DNS host name, or with the name you put in your hosts file
2) the port has to be 8080 if that is what you have as the port in your server.xml file
3) you have to spell the path to your file and your file name correctly, including case.
I'm not sure where you are with your host name, but a legitimate url for your file should be something like:
http://www.suwebbidev.southernute.com:8080/KA_Crystal_Reports/index.htm
Are you aware that you can configure Tomcat to respond on port 80? I don't know if you want the 8080 port or not.
Why don't you post your entire server.xml again -- I think maybe the Connector is not configured correctly.
Why don't you post your entire server.xml again -- I think maybe the Connector is not configured correctly.
ASKER
I am attaching the server.xml file.
server.xml
server.xml
Well -- it's odd that you don't have the Connector configured, but I used your server.xml, created a test html file, and it all worked fine.
So the hosts file:
127.0.0.1 www.suwebbidev.southernute.com
and the directory structure has to match your server.xml, so the directory has to look like:
C:\BusinessObjects\website
and there has to be the following file for the urls you are posting to work:
C:\BusinessObjects\website \KA_Crysta l_Reports\ index.htm
The line in the SAPKA access log looks like this:
127.0.0.1 - - [14/Mar/2011:14:44:06 -0400] "GET /KA_Crystal_Reports/index. htm HTTP/1.1" 200 129
So the hosts file:
127.0.0.1 www.suwebbidev.southernute.com
and the directory structure has to match your server.xml, so the directory has to look like:
C:\BusinessObjects\website
and there has to be the following file for the urls you are posting to work:
C:\BusinessObjects\website
The line in the SAPKA access log looks like this:
127.0.0.1 - - [14/Mar/2011:14:44:06 -0400] "GET /KA_Crystal_Reports/index.
ASKER
I would add the line in hosts file and check if it makes any difference. I would do that in couple of hours and let you know.
ASKER
Thank you very much!!!
Finally I can see the webpage after adding that line in hosts file. I really appreciate your help. If there is a way then I would like to give you more points.
Finally I can see the webpage after adding that line in hosts file. I really appreciate your help. If there is a way then I would like to give you more points.
Congrats! It has been a long haul.
It's not always hard to set up a Web server, but sometimes when you want a few things done a little differently than the standard, then it takes more work. Good luck!
It's not always hard to set up a Web server, but sometimes when you want a few things done a little differently than the standard, then it takes more work. Good luck!
However -- those instructions look like 2 alternative Web servers. You use either IIS or Apache as a Web server (and neither of them is Tomcat).
If you do mean you want Tomcat config info, is it connecting to IIS or Apache? Or standalone? You said "Tomcat webserver" and Tomcat can be a Web server, but the instructions above imply that you're doing something else.