Win a copy of Terraform in Action this week in the Cloud forum!

David Perry

Greenhorn
+ Follow
since Dec 12, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by David Perry

Regarding the router and port 80: My web address is configured to point to my router (which has a static IP address); the router in turn forwards all HTTP requests to the IP address of the Red Hat server. Previously, I've had this server set up with Apache and been able to access content remotely from the internet (www.mysite.com). So, I can't see there being an issue with the firewall blocking requests on port 80. As it stands now, this is the behaviour I'm getting:

When I don't have the Tomcat service running and I type http://darktower/myapp/hello on the server, a message box pops up that says 'The connection was refused when attempting to contact darktower.'

When start the Tomcat service and I type http://myapp/hello on the server, I get the web page the servlet generates.

When I type http://mysite.com/myapp/hello on the server, I get a blank web page.

I tried adding the following line to my /etc/hosts file:

192.168.1.xxx darktower.mysite.com darktower

(where 192.168.1.xxx is the static IP address I've assigned the server)

This didn't change the behaviour.

It seems to me that since the Apache content can be served remotely through the internet (www.mysite.com) that Tomcat service running on port 80 should work as well. Any further ideas? Many thanks again for your feedback. David.
17 years ago
I seem to be getting somewhere now...I started the Tomcat service as ROOT user to get it to bind on port 80 and now I can access the page locally by typing http://darktower/myapp/hello. However, when I try to access the content remotely through the internet (http://mysite.com/myapp/hello) I only get a blank page.

My setup is as follows:

- I have a domain registered (mysite.com) and the IP configured to point to my Red Hat server.
- I have a router that directs all HTTP traffic to the server (192.168.1.xxx)
- When I installed Red Hat, I set the host name to darktower.
- When I installed Red Hat, I did not install any web server services.
- I have only installed Tomcat and Java on this server.
- My /etc/hosts file has only the following entry:

127.0.0.1 darktower localhost.localdomain localhost


Any ideas as to what's missing here to allow access to the Tomcat content through the web (www.mysite.com/myapp/hello)

Thanks again. David
17 years ago
Okay, I tried your suggestion and I'm still not having any success...I formatted the machine and installed Red Hat 9 with no web services. After installing Java and Tomcat I then compiled and was able to load a servlet by typing: http://localhost:8080/myapp/hello

I then edited my server.xml file to use port 80 instead of 8080:

<!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 80 -->
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="80" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="100" debug="0" connectionTimeout="20000"
useURIValidationHack="false" disableUploadTimeout="true" />
<!-- Note : To disable connection timeouts, set connectionTimeout value
to 0 -->

I restarted Tomcat and typed http://localhost/myapp/hello and the page cannot be found. I then reset my server.xml to use port 8080 and restarted Tomcat and it worked. I tried a second time to set the port to 80 and restarted Tomcat and it still didn't work. Any suggestions? David.
17 years ago
In a nutshell, I want to set up Apache/Tomcat on Linux Red Hat 9 and be able to access the Tomcat content through the internet (www.mysite.com/myapp/hello).

Does anyone know of another forum or a resource that might have some information on how to do this? I've posted this question here for a couple of weeks and haven't had any luck finding someone that has tried to do this.

BTW - I've tried using both John Turner's and Mike Milison's reference material, with no success.

Thanks in advance for any feedback. David.
17 years ago
Thanks for your feedback. I have referenced both of the documents you suggested, however, between the two of them, I haven't been able to figure out what I'm doing wrong.

If you've been able to configure your server to allow remote machines access your Tomcat content, would you mind emailing me (davidp@cogeco.ca) your configuration files (httpd.conf, server.xml, workers.properties, /etc/hosts) so that I check your settings for clues as to what I'm doing wrong?

P.S.-Anyone out there that has been able to achieve this, please feel free to email me the above requested files.

Thanks. David.
17 years ago
1) you had no success with windows ( https://coderanch.com/t/83869/Tomcat/Request-Tomcat-remote-machine ) so now you're trying an operating system that is known to be "less user friendly". I don't mean to start a flame war between windows/nix, but c'mon.

>> I wasn't trying to imply that I thought it would be easier on Linux than Windows, but rather that I thought I'd have more success getting some help.

2) So the trouble is not in the difference between localhost and remote access. It probably has to do with how you've configured JK. This is known to be a tricky thing for many.

>> As it stands now, yes, that is my problem; I can get access to the Apache content from an internet connection (www.mysite.com) and I can access the Tomcat content locally through the mod_jk connector (http://localhost/myApp/hello). I'm dead in the water with the next step; accessing Tomcat through Apache using the mod_jk connector (www.mysite.com/myApp/hello). I'm looking for some help/feedback regarding issues with the mod_jk configuration.

3) It's inappropriate to even suggest you need a full-blown J2EE container. If you're not writing EJBs, then stick with Tomcat.

>> I asked this question because J2EE was suggested. As I mentioned, I only just learned this stuff in school (programming side) and, based on the lack of information out there regarding configuration of internet access to Tomcat content, my thinking was that Tomcat might be used primarily as a development tool, and therefore I wanted some clarification. Your answer clarified that and I appreciate your feedback.

4) 8080 through the firewall??? Where in this url do you see 8080?
http://www.mysite.com/myApp/hello...Perhaps that was in reference to what you had tried in the very first post (testing tomcat stand-alone).

>> Yes, you're right. Originally, I just tried gaining access to the Tomcat content directly. However, after trying and not having any success, I installed the mod_jk connector. As I mentioned above, this is where I'm at now, however I can't get the internet access to work (www.mysite.com/myApp/hello). This is where I need some help/suggestions.

5) Redhat has its own particular flavour of Apache installed....

>> When I installed Linux, I did not install any of the web server components. I downloaded Apache from their site and installed.

6) At this point, are you willing to try Tomcat stand-alone? From my own experience, it seems easier to get Tomcat working, and then add apache in front, after the fact.

>> I tried that. I installed Linux, then installed, configured and tested Tomcat. I got it working on http://localhost:8080/myApp/hello but was unable to get the internet access to work (www.mysite.com/myApp/hello). At that point, I installed Apache, tested it to make sure I could access the machine remotely (www.mysite.com). When this worked, I realized that my problem is with configuring the remote access to Tomcat. It was at this point, I installed the mod_jk connector and that brings me to where I am today.
>>>
I guess I'm guilty of not articulating my situation clearly. If I've offended/frustrated anyone by my choice of wording or the way I've described my situation, I'm sorry; it was not intentional.
Once again, if anyone can help me out, I'd appreciate it greatly. Thank you. David.
17 years ago
Someone else suggested to me that the firewall might be preventing the requests on port 8080 from getting through. I installed the mod_jk connector and tested access to the Tomcat servlet on the local server by typing http://localhost/myApp/hello and it worked. I then tried accessing the Tomcat servlet from a remote machine through the internet (www.mysite.com/myApp/hello) and it still did not work. Any ideas/suggestions as to why this is not working?

As for the suggestion to use the J2EE Reference Implementation from Sun; is this a better/more widely used alternative to Tomcat? Is Tomcat typically only used in a development environment? I ask this because in all of my searching for information on how set up Tomcat to handle remote requests from the internet (www.mysite.com/myApp/hello) I have only found information on configuring it to work locally (http://localhost:8080/myApp/hello).

Thank you for your comments. David.
17 years ago
>>However, Red Hat sets up a firewall using iptables (or formerly ipchains). You need to make sure that port 8080 tcp/ip is accessible through the firewall.

Okay, that makes sense. Can you tell me what file acts as the firewall to grant/deny access through the ports?

Thanks for your feedback. David.
17 years ago
I know this sounds like an Apache/Tomcat question, however, the solution may be related to the Linux configuration, so I would like to post it here to get any feedback (I have also posted this question on the Apache/Tomcat forum. I hope this is not a no-no, but I checked the FAQ and didn't see anything regarding posting the same question on two separate boards):

I have single server running Red Hat 9 with j2sdk1.4.2_04, httpd-2.0.49 and jakarta-tomcat-4.1.30. Java is working (I compiled a test servlet with no errors); Apache is working (I set up a default web page and I can view it through the browser on the server by typing http://localhost); Tomcat is working (I can view my test servlet through the browser on the server by typing http://localhost:8080/mytest/hello).

I have a domain name registered (mysite.com) and have configured the IP address to point to my Red Hat server. I have had friends test access to the server through the internet by typing www.mysite.com, and they are able to see my default web page. So far so good. What I'm attempting to do now is set up the Tomcat content so that it also can be accessed through the internet (ie. www.mysite.com:8080/mytest/hello). This is where I'm stuck. I don't know how to configure the server to allow internet access to the Tomcat content.

When I set up the server, I entered the hostname as darktower and configured the IP information. I did not configure anything regarding my domain (mysite.com). The following is what my /etc/host file contains:

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 darktower localhost.localdomain localhost

When I start Apache, I get the following message:

httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

Can someone please tell me what I have to configure to serve remote requests from the internet to Tomcat? (ie. www.mysite.com:8080/mytest/hello)

Thanking you in advance for any help and feedback. David Perry.
[ June 16, 2004: Message edited by: David Perry ]
17 years ago
I originally posted a similar question regarding this with Windows 2000 Server and I had no success getting it to work. I am now trying with Red Hat 9 and I'm hoping someone can help me out:

I have single server running Red Hat 9 with j2sdk1.4.2_04, httpd-2.0.49 and jakarta-tomcat-4.1.30. Java is working (I compiled a test servlet with no errors); Apache is working (I set up a default web page and I can view it through the browser on the server by typing http://localhost); Tomcat is working (I was able to view my test servlet through the browser on the server by typing http://localhost:8080/mytest/hello).

I have a domain name registered (mysite.com) and have configured the IP address to point to the server. I have had friends test access to the server through the internet by typing www.mysite.com, and they are able to see the default web page. So far so good. What I'm attempting to do now is set up the Tomcat content so that it also can be accessed through the internet (ie. www.mysite.com:8080/mytest/hello). This is where I'm stuck. I don't know how to configure the server/Tomcat to allow internet access to the Tomcat content.

When I set up the server, I entered the hostname as darktower and configured the IP information. I did not configure anything regarding the domain (mysite.com). The following is what my /etc/host file contains:

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 darktower localhost.localdomain localhost

When I start Apache, I get the following message:

httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

Can someone please tell me what I have to configure to serve remote requests from the internet to Tomcat? (ie. www.mysite.com:8080/mytest/hello)

Thanking you in advance for any help and feedback. David Perry.

[ June 16, 2004: Message edited by: David Perry ]
[ June 16, 2004: Message edited by: David Perry ]
17 years ago
Okay, let me see if I understand this correctly; I'd have to set up DNS if my server was managing an intranet with servers below it (subdomains?!?!)? However, for my purposes (setting up a single server with the sole purpose of hosting a web site that can be accessed by others over the internet) DNS is not necessary?

Also, on the point of the domain name, is there a difference between naming the domain www.mysite.com or mysite.com,
and which method is prefered/better?

Thanks again; I really appreciate the feedback I've gotten. Best regards. David.
17 years ago
I really appreciate your feedback; you totally cleared that up (localhost vs. DNS). I do want to allow access to the site over the internet, so DNS is the direction I'm going, which leads me to the following:

I have a book (Linux Administration Beginner's Guide) which is pretty lean on the DNS material, however, it mentions using BIND. Is this the way to go for DNS, or is there something else I should be looking into? How can I check if DNS functionality is already installed on my machine (Red Hat 9)? Can you recommend any good reference material/sites that explain how to set up and configure DNS on Red Hat?

Thanks again for your help. David.
17 years ago
Thanks for your help. I've not been able to find much information on configuring this Windows, so I'm going to give it a shot with Red Hat 9.
17 years ago
I'm trying to build/install Apache 2 on Red Hat 9 and I'm getting an error when I run the 'make' command. Here's what I've done:

1. Installed Red Hat 9. I unselected the Web Server option during the setup.
2. Downloaded httpd-2.0.49.tar.gz from Apache web site to /usr/local/src
3. From that directory, I ran tar xvzf httpd-2.0.4.49.tar.gz which creates the /usr/local/src/httpd-2.0.49 directory.
4. I cd to the /usr/local/src/httpd-2.0.49 directory and run ./configure --prefix=/usr/local/apache --enable-ssl --enable-so
5. This runs fine, so I then run 'make' (no quotes). The compile starts, but after a while, it aborts. I have copied the lines reporting the error as they appear on my screen:
.
.
.
In file included from /usr/include/openssl/ssl.h:179,
from mod_ssl.h:91,
from mod_ssl.c:26:
/usr/include/openssl/kssl.h:72:18: krb5.h: No such file or directory
In file included from /usr/include/openssl/ssl.h:179,
from mod_ssl.h:91,
from mod_ssl.c:26:
/usr/include/openssl/kssl.h:132: parse error before "krb5_enctype"
/usr/include/openssl/kssl.h:134: parse error before "FAR"
/usr/include/openssl/kssl.h:135: parse error before '}' token
/usr/include/openssl/kssl.h:147: parse error before "kssl_ctx_setstring"
/usr/include/openssl/kssl.h:147: parse error before '*' token
/usr/include/openssl/kssl.h:148: parse error before '*' token
/usr/include/openssl/kssl.h:149: parse error before '*' token
/usr/include/openssl/kssl.h:149: parse error before '*' token
/usr/include/openssl/kssl.h:150: parse error before '*' token
/usr/include/openssl/kssl.h:151: parse error before "kssl_ctx_setprinc"
/usr/include/openssl/kssl.h:151: parse error before '*' token
/usr/include/openssl/kssl.h:153: parse error before "kssl_cget_tkt"
/usr/include/openssl/kssl.h:153: parse error before '*' token
/usr/include/openssl/kssl.h:155: parse error before "kssl_sget_tkt"
/usr/include/openssl/kssl.h:155: parse error before '*' token
/usr/include/openssl/kssl.h:157: parse error before "kssl_ctx_setkey"
/usr/include/openssl/kssl.h:157: parse error before '*' token
/usr/include/openssl/kssl.h:159: parse error before "context"
/usr/include/openssl/kssl.h:160: parse error before "kssl_build_principal_2"
/usr/include/openssl/kssl.h:160: parse error before "context"
/usr/include/openssl/kssl.h:163: parse error before "kssl_validate_times"
/usr/include/openssl/kssl.h:163: parse error before "atime"
/usr/include/openssl/kssl.h:165: parse error before "kssl_check_authent"
/usr/include/openssl/kssl.h:165: parse error before '*' token
/usr/include/openssl/kssl.h:167: parse error before "enctype"
In file included from mod_ssl.h:91,
from mod_ssl.c:26:
/usr/include/openssl/ssl.h:909: parse error before "KSSL_CTX"
/usr/include/openssl/ssl.h:909: warning: no semicolon at end of struct or
union
/usr/include/openssl/ssl.h:931: parse error before '}' token
make[3]: *** [mod_ssl.lo] Error 1
make[3]: Leaving directory `/usr/local/src/httpd-2.0.49/modules/ssl'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/httpd-2.0.49/modules/ssl'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/httpd-2.0.49/modules'
make: *** [all-recursive] Error 1
[root@darktower]

Does anyone have any idea as to why this is not working?

Thanks in advance for your help. David Perry.
17 years ago
Hi all. I'm fairly green (I suppose that's evident by my post topic), however, I'm setting up RedHat 9 on a machine to use as a server to host a web site for personal use/learning, using the www address I have registered. My question is, what do I enter for the Hostname configuration when prompted during the installation? Is it www.mysite.com or just mysite.com (or something else)? Any help and advice would be greatly appreciated.

Thanks in advance for your help. David.
17 years ago