reverse proxy http to tomcatProtocol switching with reverse proxy and application server with static...
Review your own paper in Mathematics
C++ copy constructor called at return
Quoting Keynes in a lecture
How could a planet have erratic days?
Why should universal income be universal?
Is my low blitz game drawing rate at www.chess.com an indicator that I am weak in chess?
15% tax on $7.5k earnings. Is that right?
Will number of steps recorded on FitBit/any fitness tracker add up distance in PokemonGo?
Why does Carol not get rid of the Kree symbol on her suit when she changes its colours?
Can I say "fingers" when referring to toes?
Can you use Vicious Mockery to win an argument or gain favours?
Why is the "ls" command showing permissions of files in a FAT32 partition?
What does Apple's new App Store requirement mean
A variation to the phrase "hanging over my shoulders"
Delete multiple columns using awk or sed
How can I write humor as character trait?
Mimic lecturing on blackboard, facing audience
Is there a RAID 0 Equivalent for RAM?
Why is it that I can sometimes guess the next note?
Why does this expression simplify as such?
What is the highest possible scrabble score for placing a single tile
Does Doodling or Improvising on the Piano Have Any Benefits?
Has the laser at Magurele, Romania reached a tenth of the Sun's power?
What features enable the Su-25 Frogfoot to operate with such a wide variety of fuels?
reverse proxy http to tomcat
Protocol switching with reverse proxy and application server with static linksSetting up basic nginx reverse proxyWhen Using Reverse Proxy, Backend Server Does 301 Back to The Proxy Server or Changes URLreverse proxy not rewriting to httpsConfiguring Apache reverse proxyConfiguring a reverse proxy to an external server through SSL while tomcat also uses SSLReverse Proxy homepage onlyIIS Reverse Proxy to Tomcat uppercase pathBasic auth Apache with Tomcat
I've configured an Apache server with SSL and reverse proxy to a tomcat
<VirtualHost domain.com:1443>
[...]
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://local.com:8080/
ProxyPassReverse / http://local.com:8080
SSLEngine on
[...]
</VirtualHost>
Tomcat is listening on 8080.
The issue is that the app on tomcat is redirecting the request (HTTP 302 Moved temporairly). For example, if I use the URL https:// domain.com:1443/folder, reverse proxy launch the request http:// local.com:8080/folder, then, the app redirect to "/subfolder", so the final request is: http://domain.com:1443/folder/subfolder. Result is a 400 Bad request error code, as the request is HTTP on my SSL port.
Do you know how I can fix this issue ?
Thanks in advance.
apache-2.2 reverse-proxy
bumped to the homepage by Community♦ 10 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I've configured an Apache server with SSL and reverse proxy to a tomcat
<VirtualHost domain.com:1443>
[...]
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://local.com:8080/
ProxyPassReverse / http://local.com:8080
SSLEngine on
[...]
</VirtualHost>
Tomcat is listening on 8080.
The issue is that the app on tomcat is redirecting the request (HTTP 302 Moved temporairly). For example, if I use the URL https:// domain.com:1443/folder, reverse proxy launch the request http:// local.com:8080/folder, then, the app redirect to "/subfolder", so the final request is: http://domain.com:1443/folder/subfolder. Result is a 400 Bad request error code, as the request is HTTP on my SSL port.
Do you know how I can fix this issue ?
Thanks in advance.
apache-2.2 reverse-proxy
bumped to the homepage by Community♦ 10 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
You have to configure/modify your tomcat app, so that it redirects to https, not to http, when the original request was https too.
– Krist van Besien
Jun 30 '13 at 8:51
add a comment |
I've configured an Apache server with SSL and reverse proxy to a tomcat
<VirtualHost domain.com:1443>
[...]
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://local.com:8080/
ProxyPassReverse / http://local.com:8080
SSLEngine on
[...]
</VirtualHost>
Tomcat is listening on 8080.
The issue is that the app on tomcat is redirecting the request (HTTP 302 Moved temporairly). For example, if I use the URL https:// domain.com:1443/folder, reverse proxy launch the request http:// local.com:8080/folder, then, the app redirect to "/subfolder", so the final request is: http://domain.com:1443/folder/subfolder. Result is a 400 Bad request error code, as the request is HTTP on my SSL port.
Do you know how I can fix this issue ?
Thanks in advance.
apache-2.2 reverse-proxy
I've configured an Apache server with SSL and reverse proxy to a tomcat
<VirtualHost domain.com:1443>
[...]
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://local.com:8080/
ProxyPassReverse / http://local.com:8080
SSLEngine on
[...]
</VirtualHost>
Tomcat is listening on 8080.
The issue is that the app on tomcat is redirecting the request (HTTP 302 Moved temporairly). For example, if I use the URL https:// domain.com:1443/folder, reverse proxy launch the request http:// local.com:8080/folder, then, the app redirect to "/subfolder", so the final request is: http://domain.com:1443/folder/subfolder. Result is a 400 Bad request error code, as the request is HTTP on my SSL port.
Do you know how I can fix this issue ?
Thanks in advance.
apache-2.2 reverse-proxy
apache-2.2 reverse-proxy
asked Jun 29 '13 at 17:25
John QJohn Q
61
61
bumped to the homepage by Community♦ 10 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 10 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
You have to configure/modify your tomcat app, so that it redirects to https, not to http, when the original request was https too.
– Krist van Besien
Jun 30 '13 at 8:51
add a comment |
You have to configure/modify your tomcat app, so that it redirects to https, not to http, when the original request was https too.
– Krist van Besien
Jun 30 '13 at 8:51
You have to configure/modify your tomcat app, so that it redirects to https, not to http, when the original request was https too.
– Krist van Besien
Jun 30 '13 at 8:51
You have to configure/modify your tomcat app, so that it redirects to https, not to http, when the original request was https too.
– Krist van Besien
Jun 30 '13 at 8:51
add a comment |
1 Answer
1
active
oldest
votes
Instead of plain http proxy, use proxy_ajp
. Adapt the example below to match your needs, i.e. it is up to you to proxy everything to the container or only a namespace:
ProxyRequests off
ProxyPassMatch ^/(your_app)(.*) ajp://localhost:8009/$1$2 ttl=120 ping=1
Ensure that server.xml
in your tomcat
configuration includes an AJP listener. The executor is optional.
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
<Connector executor="tomcatThreadPool"
port="8009" protocol="AJP/1.3"
connectionTimeout="20000"
URIEncoding="UTF-8"
redirectPort="8443" />
Yes I thinked to do this but I have a requirement to use HTTP instead of AJP...
– John Q
Jun 29 '13 at 20:45
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f519601%2freverse-proxy-http-to-tomcat%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Instead of plain http proxy, use proxy_ajp
. Adapt the example below to match your needs, i.e. it is up to you to proxy everything to the container or only a namespace:
ProxyRequests off
ProxyPassMatch ^/(your_app)(.*) ajp://localhost:8009/$1$2 ttl=120 ping=1
Ensure that server.xml
in your tomcat
configuration includes an AJP listener. The executor is optional.
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
<Connector executor="tomcatThreadPool"
port="8009" protocol="AJP/1.3"
connectionTimeout="20000"
URIEncoding="UTF-8"
redirectPort="8443" />
Yes I thinked to do this but I have a requirement to use HTTP instead of AJP...
– John Q
Jun 29 '13 at 20:45
add a comment |
Instead of plain http proxy, use proxy_ajp
. Adapt the example below to match your needs, i.e. it is up to you to proxy everything to the container or only a namespace:
ProxyRequests off
ProxyPassMatch ^/(your_app)(.*) ajp://localhost:8009/$1$2 ttl=120 ping=1
Ensure that server.xml
in your tomcat
configuration includes an AJP listener. The executor is optional.
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
<Connector executor="tomcatThreadPool"
port="8009" protocol="AJP/1.3"
connectionTimeout="20000"
URIEncoding="UTF-8"
redirectPort="8443" />
Yes I thinked to do this but I have a requirement to use HTTP instead of AJP...
– John Q
Jun 29 '13 at 20:45
add a comment |
Instead of plain http proxy, use proxy_ajp
. Adapt the example below to match your needs, i.e. it is up to you to proxy everything to the container or only a namespace:
ProxyRequests off
ProxyPassMatch ^/(your_app)(.*) ajp://localhost:8009/$1$2 ttl=120 ping=1
Ensure that server.xml
in your tomcat
configuration includes an AJP listener. The executor is optional.
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
<Connector executor="tomcatThreadPool"
port="8009" protocol="AJP/1.3"
connectionTimeout="20000"
URIEncoding="UTF-8"
redirectPort="8443" />
Instead of plain http proxy, use proxy_ajp
. Adapt the example below to match your needs, i.e. it is up to you to proxy everything to the container or only a namespace:
ProxyRequests off
ProxyPassMatch ^/(your_app)(.*) ajp://localhost:8009/$1$2 ttl=120 ping=1
Ensure that server.xml
in your tomcat
configuration includes an AJP listener. The executor is optional.
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
<Connector executor="tomcatThreadPool"
port="8009" protocol="AJP/1.3"
connectionTimeout="20000"
URIEncoding="UTF-8"
redirectPort="8443" />
answered Jun 29 '13 at 17:53
dawuddawud
13.5k33054
13.5k33054
Yes I thinked to do this but I have a requirement to use HTTP instead of AJP...
– John Q
Jun 29 '13 at 20:45
add a comment |
Yes I thinked to do this but I have a requirement to use HTTP instead of AJP...
– John Q
Jun 29 '13 at 20:45
Yes I thinked to do this but I have a requirement to use HTTP instead of AJP...
– John Q
Jun 29 '13 at 20:45
Yes I thinked to do this but I have a requirement to use HTTP instead of AJP...
– John Q
Jun 29 '13 at 20:45
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f519601%2freverse-proxy-http-to-tomcat%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You have to configure/modify your tomcat app, so that it redirects to https, not to http, when the original request was https too.
– Krist van Besien
Jun 30 '13 at 8:51