• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How Configure Apache with different port than default

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ami3.png]
ami1.png
[Thumbnail for ami1.png]
ami2.png
[Thumbnail for ami2.png]
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Maroof Ahmad
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 "https://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).
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic