Solved

How to run PHP & JSP application on the same port in linux?

Posted on 2008-10-24
3
698 Views
Last Modified: 2013-12-06
I have 2 web applications running on the same Linux server. Now, I have a web application in JSP which runs in Tomcat Web Server , port 8080 & I will access like this,

http://111.333.77.9:8080/TEST ... now i get the application access and try to use it.

In the same server, I have an local intranet email (squirrelmail) configured which runs like this, http://test.com  , port, 80& (virtual host created for this)  & basically I want to integrate this into TEST JSP application

When I use the JSP application, I could not access the http://test.com which runs in 80 port& I have integrated this into TEST JSP application & 

After logging from TEST JSP application, I could not access the http://test.com domain pages&it is because of both applications are running on different ports (8080 & 80)

 How to configure this?

thanks
0
Comment
Question by:Loganathan Natarajan
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
Rance_Hall earned 500 total points
ID: 22798411
I hate to say this, but I dont fully see how this is going to work.

I have an idea, but its an untested idea, so It may not work.

first, no two web servers can run on the same ip/port combination, and its clear you already understand this.

you of course should be able to open two different web browsers one to the squirrelmail session and one to the tomcat session.  if you cant do this then you have a different problem.

so your squirrelmail running in apache, and your jsp app running in tomcat HAVE to run on different IP/PORT combinations.


two easiest fixes:

1) find a squirrelmail-like app that you like that runs in tomcat.  if you can find such a thing, then configure tomcat to run it and you will have webmail access within your tomcat session.

2) find an app that is like you JSP all that doesnt require tomcat, if this app (or one like it) can run in a plain apache session then you can have webmail and your custom app linked.

harder fix:

1) Find a tomcat based web brower tool that can open up a web window from within a tomcat generated page, and use that window to open a plain web based squirrelmail session.

what makes the most sense:

1) use subdomains like webmail.domain.com and webapp.domain.com -- the beauty of this setup is that they are supposed to be seperate, and you can link from one to the other whenever/whereever you want.

0
 
LVL 36

Author Comment

by:Loganathan Natarajan
ID: 22802007
thanks for the idea's, let me get back..
0
 
LVL 36

Author Closing Comment

by:Loganathan Natarajan
ID: 31509732
thanks,
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question