Use Apache server behind proxy server - apache

I have apache2.4 webserver installed on ubuntu 14.04, which has all the configuration for the virtual host file.Also I have configured ssl certificates in it. But I want to run this apache server behind other proxy server which have different IP then the Web Server.
Please suggest me the best way to do this.I am planing to install another apache on the proxy server and achieve this using reverse-proxy.But Please suggest any better way to do this.
Thanks
Vinay

I recently read some doc about setting up a reverse proxy server and it seems that ningx is a better choice than Apache for this task: it is very lightweight and really easy to configure. For example in a doc I read the writer could not manage to set up correct proxy for HTTPS for Apache, while another one trying the same configuration for nginx set it up easily. I am an old Apache fan, but if I had to install a proxy, I would chose nginx.

Related

WebLogic (with SSL) as proxy for any WSGI web server

I researched about any plugin/module WSGI for Oracle WebLogic 12c that allows me run a python flask app, with no success.
The reason for why i need to run from WebLogic 12c, it's because i need to use the SSL certfied living there.
Researching, i found many web server (Apache, Gunicorn, etc) can act as proxy of WebLogic, here is an example, where Nginx receive all the requests with SSL and then passed them to WebLogic:
https://medium.com/#Dracontis/nginx-as-proxy-for-weblogic-with-ssl-c7e1076e2c0c
So, i wonder if there is a manner to invert this order? I mean, WebLogic receive all the requests (safely because of SSL certified) and then pass them to any web server with the WSGI standard.
Thanks in advance.
I didn't find a sort of solution that accomplished the topic above. However, in case someone needs implements this topology here is what i did:
I've installed an Oracle HTTP Server (OHS) and creating a wallet for the SSL certified, in certain way in which the OHS can receive the requests secure, then inside the OHS with specific setting achieve forward the request to the Apache running with the module WSGI.

Is is mandatory to use httpd with tomcat?

Is is mandatory to use tomcat with httpd? Cant we just use tomcat directly avoid one more layer? We are running tomcat on port 80 and not using apache web server. Is this OK? Why typically httpd is used with tomcat?
This link "Why use Apache Web server in front of Tomcat" (it seems) explains your question very well.
In case I have misinterpreted the problem statement, let me know.

How to configure apache to proxy requests

I want to add a javascript based chat system to my web app. I have read in many places that apache needs to forward(proxy) the requests to the xmpp chat server.
From what I have understood , I either need to add proxying support to apache server
OR use the jabberHTTPbind servelet.
I am trying the first thing. Add proxy support to apache. Now within Eclipse I am using Tomcat 7.0. I think this Tomcat comes with its own web server and is not using Apache. Is that true ?I am using Tomcat from http://tomcat.apache.org/download-70.cgi and added server in Eclipse by providing its extracted path.
I am not able to find any apache related folder structure eg(/etc/apache2/apache2.conf) within my Tomcat extracted directory.Also can't find httpd.conf anywhere .
Should I need to download apache separately and connect my tomcat to it.
I think adding proxy support to apache is required because javascript code won't be able to connect to any URL other than the current domain. so the question again is the same , where are all these apache2.conf and httpd.conf to add mod_proxy. and where can I do the virtual host mapping.
Any help to move ahead with be very much appreciated.
You need to install the Apache HTTPD server and enable reverse proxying. Read the doc on mod_proxy on how to do this. There are tons of resources on Stackoverflow as well; search for Apache reverse Proxy. The conf files you mention are part of the Apache HTTPD install.
javascript code won't be able to connect to any URL other than the current domain
That is generally true unless you enable CORS

How to install Tomcat on Apache HTTP Server

I am playing around GeoServer and I have a Apache HTTP Server
I want to put GeoServer on my Apache HTTP Server, but we can only download a WAR file of GeoServer for Tomcat.
Is it possible to install Tomcat on Apache HTTP server?
Tomcat is seperate product which has nothing to do with the Apache Web Server and has to be installed separately,
Apache Tomcat has nothing to do with Apache HTTP Server. If you are trying to deploy some java webapps with JSPs and Servlets (and may be other web framework that uses these two) you just need to install tomcat server only. You can download it from here.
If you want to know the difference b/w Tomcat and HTTP server its given in this question
Hope this is useful. If any mistakes pardon me.

How to bind an ip AND ports to subdomains using JBoss (Or Apache Tomcat)

This is my problem:
I have a JBoss server (Running an existing app) and a Apache Tomcat (Running an app created by me) server running on the same server with different ports.
I have two subdomain names which i have routed to the IP of the server.
What i need to do is to bind the subdomain names to the IP, but with different ports.
I saw an easy way to do it with XAMPP and apache, editing the httpd.conf, but i can't find any simular fway to do it with Apache Tomcat or JBoss.
Does anyone have any ideas about this?
I rather have a solution on the question above, but the question below can be accepted as a backup solution:
Since i could not figure that out, i had to at least have a solution to one of the applications (the one running at JBoss).
So i configured JBoss to port 80 instead of 8080.
What happens now if i go to the subdomains is that i get the JBoss welcome window.
How can i change the default JBoss "app" to my app?
Thanks in advance
There's no way to get this:
sub1.domain.com(192.168.0.1) on port 80 --> jboss app
sub2.domain.com(192.168.0.1) on port 80 --> tomcat app
without either adding to or subtracting from your software stack.
Your options are:
use jboss to run your tomcat app
add a reverse-proxy
use an HTTP-aware layer 7 firewall
The first is probably easiest; jboss deploys web applications using tomcat (or, in more recent versions, a fork of tomcat called jbossweb), so you can probably just drop your .war into the deploy directory.
If that's not possible for some reason, I'd use a reverse-proxy. Apache HTTPD with mod_proxy or mod_jk is fairly common. If you go the mod_jk route and you have non-trivial load, I'd review this.
The last I'm not familiar with. I imagine that the spendy Cisco firewalls can do this, and I'm sure it's possible to hack iptables to do it too, but my google-fu failed to find specifics.