• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

how to redirect from apache to tomcat..?

 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Members,

I have an application which works on 'http://localhost:8080/', but i need to redirect it to 'http://localhost'.

If i enter 'http://localhost' it should redirect to 'http://localhost:8080/'

Please let me know the configuration setup to do for this.

Regards,
Prabhu.
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The default HTTP port is 80.
If you donĀ“t specify the port in the URL, then port 80 will be used. E.g. http://google.com:80.
So you need to change port 8080 in Tomcat configuration to port 80.

By the way, the statement "redirect from apache to tomcat" makes really no sense. Why do you want to redirect from the manfacturer to its product .. ??
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bauke Scholtz wrote:

By the way, the statement "redirect from apache to tomcat" makes really no sense. Why do you want to redirect from the manfacturer to its product .. ??



I think He wants to say like this

"Redirect from Apache HTTP Server(httpd) to Tomcat Servlet container instance"..

I too want to host my web application which is running in tomcat on port 8080, and working in localhost very fine, Now but when I got IP address with domain name, I can not used it on internet ,
like http://mysite.com/myapp/mypage.jsp. (Need to give URL like, http://mysite.com:8080/myapp/mypage.jsp)

I got some web resources, which tell us to connect Tomcat through Apache HTTPD using JK (Apache Connector).
Here is the link,

http://www.devside.net/guides/windows/tomcat

http://www.anchor.com.au/hosting/dedicated/tomcat_with_apache_on_windows_x64

But unfortunately, I cant figure it out..

What may be the cause..
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would just read the documentation which come along with it: http://tomcat.apache.org/connectors-doc
 
prabhu pandurangan
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Sagar

you are right. It is the one i need to do. However im facing some issues like: "proxy ajp failed to make connection to localhost".

FYI: Im using FC6 machine.

Regards,
Prabhu.

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It sounds like you're far enough along that you have a couple of lines like:



In your Apache httpd configuration. Can you post your progress so far? It'll be easier to debug that way.
 
prabhu pandurangan
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
FYI:

I have installed Tomcat by extracting; so i manually added a file named 'tomcat' and placed the script to run tomcat as a services; but in that it shows an error in its status field; will it be a reason for this issue.

Also i have installed 'openssl' for some security purpose and while configuring tomcat with openssl; Im facing some issues like:

Error:
"proxy ajp failed to make connection to localhost".

Also after configuring with Openssl, I could not even start my 'httpd' service, it shows an error message as "service temporarily unavailable".

File added to "/etc/init.d/" file name is 'tomcat':



Error Message:

/etc/init.d/tomcat: line10: ./etc/sysconfig/network. Permission Denied
/etc/init.d/tomcat: line13: [=no]: command not found
/etc/init.d/tomcat: line55: status: command not found


Please go through this and let me know what would be the cause for this issue. Permission denied. I think that this may be a problem for this

 
In the renaissance, how big were the dinosaurs? Did you have tiny ads?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic