LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-12-2016, 08:58 AM   #1
hruday
Member
 
Registered: Jun 2015
Posts: 88

Rep: Reputation: Disabled
Configure apache in multiple interface and proxy pass jboss


My server details are as follows
Centos 6
apache 2.2.15

i am using static ip XX.XX.XX.XX

i have 4 interfaces configured in centos as follows

eth0 10.0.1.a
eth1 10.0.1.b
eth2 10.0.1.c
eth3 10.0.1.d

apache port 80 is listening on 10.0.1.a interface

i configured jboss port number 9393 in standalone.xml and started it and WAR file deployed.

But browser is not loading files and showing website.


My virtual host file is as follows

<VirtualHost *:80>

ServerName abc.com
ServerAlias www.abc.com

ErrorLog /var/log/httpd/abc-error.log
CustomLog /var/log/httpd/abc-access.log common env=!dontlog

RewriteEngine On
RewriteOptions Inherit

RewriteRule ^/$ /def/ [R=301,L]

ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass / http://localhost:9393/
ProxyPassReverse / http://localhost:9393/
<Location />

</VirtualHost>

What should be the cause?
 
Old 08-13-2016, 02:56 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
apache port 80 is listening on 10.0.1.a interface
i configured jboss port number 9393 in standalone.xml and started it and WAR file deployed.
But browser is not loading files and showing website.
Please explain what you mean by "not loading files and showing website". What you get in your browser when visiting http://www.abc.com?
From your post, my guess is that your app is running under the /def context in jboss. If that's the case, you should use:
Code:
ProxyPass /def/ http://localhost:9393/def/
ProxyPassReverse /def/ http://localhost:9393/def/
Regards
 
Old 08-15-2016, 11:53 AM   #3
hruday
Member
 
Registered: Jun 2015
Posts: 88

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Please explain what you mean by "not loading files and showing website". What you get in your browser when visiting http://www.abc.com?
From your post, my guess is that your app is running under the /def context in jboss. If that's the case, you should use:
Code:
ProxyPass /def/ http://localhost:9393/def/
ProxyPassReverse /def/ http://localhost:9393/def/
Regards

website just loads and doesnt show anything. WAR file is not picking up resources.
 
Old 08-15-2016, 12:24 PM   #4
ihaveavirus
LQ Newbie
 
Registered: Jul 2016
Distribution: RHEL
Posts: 22

Rep: Reputation: Disabled
I see an issue with your reverse proxy:

ProxyPass / http://localhost:9393/
ProxyPassReverse / http://localhost:9393/

ProxyPass is your source port while ProxyPassReverse should be the destination port you need traffic to move to. Let me show you what I mean....

If I have Apache Tomcat over SSL (port 8443) and I want it to be only accessible over HTTPS (port 443), I would add the following to my ssl.conf (in your case httpd.conf):

ProxyPreserveHost On
ProxyPass / http://localhost:8443/
ProxyPassReverse / https://localhost/
</VirtualHost>

That's all there is too it to run a reverse proxy. Try fixing those settings first (obviously change the information from my example) before trying anything else.
 
Old 08-16-2016, 01:38 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by hruday View Post
website just loads and doesnt show anything. WAR file is not picking up resources.
Did you try the config of my previous post?
If war "is not picking resources", then perhaps there is something wrong with application itself.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Reg: Apache Configuration to pass traffic to different Ear (jboss) vamsi_k Linux - Software 0 02-16-2014 07:45 PM
How to Install and configure apache and Jboss in debian lakshmi4linux Linux - Newbie 5 04-09-2009 01:31 PM
how to configure reverse proxy using Apache ashok shirke Linux - Server 3 06-16-2008 04:24 AM
apache proxy/pass SSL singersoll Linux - Server 3 08-22-2007 01:48 AM
Apache mod_proxy Proxy Pass dancarl Linux - Software 0 08-15-2005 11:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration