File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Java Products and Servers and the fly likes How Configure Apache with different port than default Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "How Configure Apache with different port than default" Watch "How Configure Apache with different port than default" New topic
Author

How Configure Apache with different port than default

Maroof Ahmad
Greenhorn

Joined: May 23, 2013
Posts: 6
Hi,

I am preparing production server with Apache Web Server 2.2 and Weblogic 10.3.5 Standalone. That server also running OC4J application server where ports 80(plain) and 443(SSL) configured and running. I am configured Apache Server with port 7080(for plain) and 7443(for SSL) with weblogic. Now its running and i am able to access URL with the port ex. https://applications.almullagroup.com:7443/amificweb/faces/login_1.jspx

But i need to that URL without port ex. https://almullagroup.com/amificweb/faces/login_1.jspx . How can i achive this URL. I have written re-wright url in httpd.conf

##Added by Maroof on Oct 28 2013


when i remove port manually from URL then i am getting below message

"Not Found
The requested URL /amificweb/faces/login_1 was not found on this server.
Oracle-Application-Server-10g/10.1.3.1.0 Oracle-HTTP-Server Server at applications.almullagroup.com Port 443"


Keep in mind 443 already port is running with OC4J instance.

Regards
Maroof


[ami3.png]

[Thumbnail for ami1.png]

[Thumbnail for ami2.png]

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41129
    
  45
If some app run by OC4J is already listening on port 443, then you can't expect an URL that's valid for the WebLogic app running on port 7443 to be reachable on that same port 443. Or am I misunderstanding something?


Ping & DNS - my free Android networking tools app
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960
    
  19

We don't really have a forum specific to the Apache HTTPD server, although people use the Apache Tomcat server forum usually. This isn't really a JSF question, although since I'm really a jerk about such things, I will mention that the mere fact that you have a "login.jspx" page tells me that there's a virtual certainty that your webapp is not secure enough to withstand an attack by unskilled people. Plus, if you want to combine all of those servers into a seamless system, you really need to consider a Single Signon security system.

Normally you would have Apache HTTPD be the world-facing server and have it proxy for the application server(s), such as Tomcat, WebLogic, OC4J and so forth. Since the default ports for HTTP and HTTPS are 80 and 443, respectively, you would have them owned by Apache. TCP/IP ports can belong to one and ONLY one program on a given OS instance, so you'd either have to be running OC4J on a different (real or virtual) machine or change its port assignments.

When Apache is fronting for Apache Tomcat, you don't rewrite URLs for it, you use the mod_jk or mod_proxy Apache modules to pass the requests directly from Apache to the backend processors. I haven't had to do anything like that for WebLogic or OC4J for a while now, so all I can suggest is to read their documentation. We have Ranch forums that support those products, however, and chances are that you'll find at least one person on each forum who has dealt with proxying issues.


Customer surveys are for companies who didn't pay proper attention to begin with.
Maroof Ahmad
Greenhorn

Joined: May 23, 2013
Posts: 6
Ulf Dittmer wrote:If some app run by OC4J is already listening on port 443, then you can't expect an URL that's valid for the WebLogic app running on port 7443 to be reachable on that same port 443. Or am I misunderstanding something?


Actually I have one URL ex. applications.almullagroup.com and which is mapped with machine IP and ports 80, 443. Now i want same URL configure in Apache web server since 80, 443 already listening by OC4J so i configured 7080 and 7443 for Apache web server how can access my URL without port in browser address bar.

Maroof
Maroof Ahmad
Greenhorn

Joined: May 23, 2013
Posts: 6
Tim Holloway wrote:We have Ranch forums that support those products, however, and chances are that you'll find at least one person on each forum who has dealt with proxying issues.


Can you or i move this post to Apache Tomcat server forum?

Maroof
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41129
    
  45
Maroof Ahmad wrote:Actually I have one URL ex. applications.almullagroup.com and which is mapped with machine IP and ports 80, 443. Now i want same URL configure in Apache web server since 80, 443 already listening by OC4J so i configured 7080 and 7443 for Apache web server how can access my URL without port in browser address bar.

Yes, that's what I thought you asked, and it's impossible. You can't have two processes listening on the same port for HTTP(S) traffic - it's either OC4J or WebLogic. If it's supposed to be Apache, then mod_rewrite might help if you somehow partition the URL space.

Looking at your rewrite rules, they look rather funky: HTTPS is OFF, but the port is 7443 - that sounds fishy. Also, you have two HTTP_HOST conditions, one of them empty...? Lastly, the rule has the URI behind the colon where the port would go. So I think it needs some work before it can handle part of the URL space. But then, the rule matches all URLs - which would leave nothing for OC4J to handle.

Can you or i move this post to Apache Tomcat server forum?

It's not a Tomcat question, so that's not a good fit. I'll move it to a more appropriate forum.
Maroof Ahmad
Greenhorn

Joined: May 23, 2013
Posts: 6
Ulf Dittmer wrote:
Can you or i move this post to Apache Tomcat server forum?

It's not a Tomcat question, so that's not a good fit. I'll move it to a more appropriate forum.


Move ASAP, because i am looking a solution from this forum.

Maroof
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41129
    
  45
Move ASAP, because i am looking a solution from this forum.

I had already moved it. Next time you may want to add a "please" to such a sentence. I think you're well-advised not to expect a solution, and keep looking yourself. For example, start fixing the problems I pointed out with your mod_rewrite approach.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960
    
  19

Maroof Ahmad wrote:
Ulf Dittmer wrote:If some app run by OC4J is already listening on port 443, then you can't expect an URL that's valid for the WebLogic app running on port 7443 to be reachable on that same port 443. Or am I misunderstanding something?


Actually I have one URL ex. applications.almullagroup.com and which is mapped with machine IP and ports 80, 443. Now i want same URL configure in Apache web server since 80, 443 already listening by OC4J so i configured 7080 and 7443 for Apache web server how can access my URL without port in browser address bar.

Maroof


You cannot. All TCP requests MUST target a specific IP address and port. If you do not explicitly define them, defaults will be taken. For the IP address, a symbolic (domain) name may be used and the client system's resolvers will be tasked with converting it to an IP address.

For example, if I type "coderanch" in the browser URL control and hit Enter, the browser will supply the missing parts. They include the protocol (http:), the server name (www) and top-level domain name (.com) as well as the port (80, since that's the standard for http). Thus, the effective URL is "http://www.coderanch.com:80/", and www.coderanch.com is resolved by your client domain name lookup services to get the IP address (64.78.181.5).
 
 
subject: How Configure Apache with different port than default
 
Similar Threads
https request throws 503 while http works
How open port 443 on apache http server
http request sending garbage response when request is sent on SSL port.
Configure Proxy in apache for JBoss
SSL request on tomcat from apache