How to redirect URL with port to URL with context?Browser or Apache2 does not see files: “server software is running but no content has been added”HTTP to HTTPS mod_rewrite with clean URLsvHost redirect not working at allApache Reverse Proxy Redirect ErrorRedirect specifc HTTPS request to a specific port with apacheHow To Serve Django Applications with Apache and mod_wsgi on LXLEApache HTTP Server reverse proxying from port 80 to port *Apache Redirect Dynamic Url to Static. Dynamic string shows in target URLHTTP to HTTPS redirect pretty URL's not working
How do we avoid CI-driven development...?
Did WWII Japanese soldiers engage in cannibalism of their enemies?
How do I explain to a team that the project they will work on for six months will 100% fail?
Does a code snippet compile? Or does it gets compiled?
Can an SPI slave start a transmission in full-duplex mode?
Physics of Guitar frets and sound
Is The Lion King live action film made in motion capture?
sed delete all the words before a match
What is the idiomatic way of saying “he is ticklish under armpits”?
Double blind peer review when paper cites author's GitHub repo for code
Circle around all points of a layer
How do I calculate the difference in lens reach between a superzoom compact and a DSLR zoom lens?
Can I call myself an assistant professor without a PhD
Why is there a need to prevent a racist, sexist, or otherwise bigoted vendor from discriminating who they sell to?
Why was CPU32 core created, and how is it different from 680x0 CPU cores?
Atari ST DRAM timing puzzle
Geometric programming: Why are the constraints defined to be less than/equal to 1?
Why should we care about syntactic proofs if we can show semantically that statements are true?
Why should public servants be apolitical?
Is it possible to script what applications should open certain file extensions?
SQL Minimum Row count
What is a "Genuine Geraldo interviewee"?
Pandas: fill one column with count of # of obs between occurrences in a 2nd column
What are good ways to improve as a writer other than writing courses?
How to redirect URL with port to URL with context?
Browser or Apache2 does not see files: “server software is running but no content has been added”HTTP to HTTPS mod_rewrite with clean URLsvHost redirect not working at allApache Reverse Proxy Redirect ErrorRedirect specifc HTTPS request to a specific port with apacheHow To Serve Django Applications with Apache and mod_wsgi on LXLEApache HTTP Server reverse proxying from port 80 to port *Apache Redirect Dynamic Url to Static. Dynamic string shows in target URLHTTP to HTTPS redirect pretty URL's not working
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have a server with apache(2.4.18) installed
I have installed multiple applications on the server like Grafana, Sonarqube, and MySQL enterprise monitor(MEM)
Each application has URL like this
http://test.com:9000
http://test.com:3000
I am looking for a solution which allows me to redirect this URL with the port to URL with context, something like that
http://test.com:9000 --> http://test.com/sonar
http://test.com:3000 --> http://test.com/grafana
I have added some code in /etc/apache2/sites-enabled/000-default.conf file
Redirect permanent /sonar http://test.com:9000
Redirect permanent /grafana http://test.com:3000
but when I enter http://test.com/sonar
in the web browser it redirects to http://test.com:9000
URL only
I want http://test.com/sonar
this URL to persists on Web browser
apache apache2
add a comment |
I have a server with apache(2.4.18) installed
I have installed multiple applications on the server like Grafana, Sonarqube, and MySQL enterprise monitor(MEM)
Each application has URL like this
http://test.com:9000
http://test.com:3000
I am looking for a solution which allows me to redirect this URL with the port to URL with context, something like that
http://test.com:9000 --> http://test.com/sonar
http://test.com:3000 --> http://test.com/grafana
I have added some code in /etc/apache2/sites-enabled/000-default.conf file
Redirect permanent /sonar http://test.com:9000
Redirect permanent /grafana http://test.com:3000
but when I enter http://test.com/sonar
in the web browser it redirects to http://test.com:9000
URL only
I want http://test.com/sonar
this URL to persists on Web browser
apache apache2
add a comment |
I have a server with apache(2.4.18) installed
I have installed multiple applications on the server like Grafana, Sonarqube, and MySQL enterprise monitor(MEM)
Each application has URL like this
http://test.com:9000
http://test.com:3000
I am looking for a solution which allows me to redirect this URL with the port to URL with context, something like that
http://test.com:9000 --> http://test.com/sonar
http://test.com:3000 --> http://test.com/grafana
I have added some code in /etc/apache2/sites-enabled/000-default.conf file
Redirect permanent /sonar http://test.com:9000
Redirect permanent /grafana http://test.com:3000
but when I enter http://test.com/sonar
in the web browser it redirects to http://test.com:9000
URL only
I want http://test.com/sonar
this URL to persists on Web browser
apache apache2
I have a server with apache(2.4.18) installed
I have installed multiple applications on the server like Grafana, Sonarqube, and MySQL enterprise monitor(MEM)
Each application has URL like this
http://test.com:9000
http://test.com:3000
I am looking for a solution which allows me to redirect this URL with the port to URL with context, something like that
http://test.com:9000 --> http://test.com/sonar
http://test.com:3000 --> http://test.com/grafana
I have added some code in /etc/apache2/sites-enabled/000-default.conf file
Redirect permanent /sonar http://test.com:9000
Redirect permanent /grafana http://test.com:3000
but when I enter http://test.com/sonar
in the web browser it redirects to http://test.com:9000
URL only
I want http://test.com/sonar
this URL to persists on Web browser
apache apache2
apache apache2
asked Mar 27 at 6:51
DevendraDevendra
358 bronze badges
358 bronze badges
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
If you use Redirect permanent
, server will send 301
response back to client (along with new Location
). That will result in browser issuing a new request, this time to new Location, and also new location will be shown in browser address bar.
What you need is Reverse Proxy. For this you need to make sure that mod_proxy is enabled in your apache configuration (usually it is enabled by default), and put something like this in your .conf
file:
ProxyPreserveHost On
ProxyPass /sonar http://127.0.0.1:9000
ProxyPassReverse /sonar http://127.0.0.1:9000
ProxyPass /grafana http://127.0.0.1:3000
ProxyPassReverse /grafana http://127.0.0.1:3000
You will probably also have to make your applications aware that they are running under non-root context (by making some configuration changes):
http://docs.grafana.org/installation/behind_proxy/
https://docs.sonarqube.org/latest/setup/install-server/
Hi, I tried this but getting a blank page on /sonar context
– Devendra
Mar 28 at 6:19
Doeshttp://test.com:9000
open OK?
– Dusan Bajic
Mar 28 at 8:49
add a comment |
You need to proxy requests and not redirect them.
Use a ProxyPass directive as mentioned in the official apache proxy documentation
For example add this location block inside your configuration:
<Location "/sonar">
ProxyPass "http://test.com:9000"
</Location>
Hi, I tried this but getting a blank page on /sonar context
– Devendra
Mar 28 at 6:19
Check out if your sonar config is set up correctly to receive the proxied requests.
– workaround
Mar 28 at 8:00
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
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%2fstackoverflow.com%2fquestions%2f55371358%2fhow-to-redirect-url-with-port-to-url-with-context%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you use Redirect permanent
, server will send 301
response back to client (along with new Location
). That will result in browser issuing a new request, this time to new Location, and also new location will be shown in browser address bar.
What you need is Reverse Proxy. For this you need to make sure that mod_proxy is enabled in your apache configuration (usually it is enabled by default), and put something like this in your .conf
file:
ProxyPreserveHost On
ProxyPass /sonar http://127.0.0.1:9000
ProxyPassReverse /sonar http://127.0.0.1:9000
ProxyPass /grafana http://127.0.0.1:3000
ProxyPassReverse /grafana http://127.0.0.1:3000
You will probably also have to make your applications aware that they are running under non-root context (by making some configuration changes):
http://docs.grafana.org/installation/behind_proxy/
https://docs.sonarqube.org/latest/setup/install-server/
Hi, I tried this but getting a blank page on /sonar context
– Devendra
Mar 28 at 6:19
Doeshttp://test.com:9000
open OK?
– Dusan Bajic
Mar 28 at 8:49
add a comment |
If you use Redirect permanent
, server will send 301
response back to client (along with new Location
). That will result in browser issuing a new request, this time to new Location, and also new location will be shown in browser address bar.
What you need is Reverse Proxy. For this you need to make sure that mod_proxy is enabled in your apache configuration (usually it is enabled by default), and put something like this in your .conf
file:
ProxyPreserveHost On
ProxyPass /sonar http://127.0.0.1:9000
ProxyPassReverse /sonar http://127.0.0.1:9000
ProxyPass /grafana http://127.0.0.1:3000
ProxyPassReverse /grafana http://127.0.0.1:3000
You will probably also have to make your applications aware that they are running under non-root context (by making some configuration changes):
http://docs.grafana.org/installation/behind_proxy/
https://docs.sonarqube.org/latest/setup/install-server/
Hi, I tried this but getting a blank page on /sonar context
– Devendra
Mar 28 at 6:19
Doeshttp://test.com:9000
open OK?
– Dusan Bajic
Mar 28 at 8:49
add a comment |
If you use Redirect permanent
, server will send 301
response back to client (along with new Location
). That will result in browser issuing a new request, this time to new Location, and also new location will be shown in browser address bar.
What you need is Reverse Proxy. For this you need to make sure that mod_proxy is enabled in your apache configuration (usually it is enabled by default), and put something like this in your .conf
file:
ProxyPreserveHost On
ProxyPass /sonar http://127.0.0.1:9000
ProxyPassReverse /sonar http://127.0.0.1:9000
ProxyPass /grafana http://127.0.0.1:3000
ProxyPassReverse /grafana http://127.0.0.1:3000
You will probably also have to make your applications aware that they are running under non-root context (by making some configuration changes):
http://docs.grafana.org/installation/behind_proxy/
https://docs.sonarqube.org/latest/setup/install-server/
If you use Redirect permanent
, server will send 301
response back to client (along with new Location
). That will result in browser issuing a new request, this time to new Location, and also new location will be shown in browser address bar.
What you need is Reverse Proxy. For this you need to make sure that mod_proxy is enabled in your apache configuration (usually it is enabled by default), and put something like this in your .conf
file:
ProxyPreserveHost On
ProxyPass /sonar http://127.0.0.1:9000
ProxyPassReverse /sonar http://127.0.0.1:9000
ProxyPass /grafana http://127.0.0.1:3000
ProxyPassReverse /grafana http://127.0.0.1:3000
You will probably also have to make your applications aware that they are running under non-root context (by making some configuration changes):
http://docs.grafana.org/installation/behind_proxy/
https://docs.sonarqube.org/latest/setup/install-server/
answered Mar 27 at 10:08
Dusan BajicDusan Bajic
6,7873 gold badges20 silver badges29 bronze badges
6,7873 gold badges20 silver badges29 bronze badges
Hi, I tried this but getting a blank page on /sonar context
– Devendra
Mar 28 at 6:19
Doeshttp://test.com:9000
open OK?
– Dusan Bajic
Mar 28 at 8:49
add a comment |
Hi, I tried this but getting a blank page on /sonar context
– Devendra
Mar 28 at 6:19
Doeshttp://test.com:9000
open OK?
– Dusan Bajic
Mar 28 at 8:49
Hi, I tried this but getting a blank page on /sonar context
– Devendra
Mar 28 at 6:19
Hi, I tried this but getting a blank page on /sonar context
– Devendra
Mar 28 at 6:19
Does
http://test.com:9000
open OK?– Dusan Bajic
Mar 28 at 8:49
Does
http://test.com:9000
open OK?– Dusan Bajic
Mar 28 at 8:49
add a comment |
You need to proxy requests and not redirect them.
Use a ProxyPass directive as mentioned in the official apache proxy documentation
For example add this location block inside your configuration:
<Location "/sonar">
ProxyPass "http://test.com:9000"
</Location>
Hi, I tried this but getting a blank page on /sonar context
– Devendra
Mar 28 at 6:19
Check out if your sonar config is set up correctly to receive the proxied requests.
– workaround
Mar 28 at 8:00
add a comment |
You need to proxy requests and not redirect them.
Use a ProxyPass directive as mentioned in the official apache proxy documentation
For example add this location block inside your configuration:
<Location "/sonar">
ProxyPass "http://test.com:9000"
</Location>
Hi, I tried this but getting a blank page on /sonar context
– Devendra
Mar 28 at 6:19
Check out if your sonar config is set up correctly to receive the proxied requests.
– workaround
Mar 28 at 8:00
add a comment |
You need to proxy requests and not redirect them.
Use a ProxyPass directive as mentioned in the official apache proxy documentation
For example add this location block inside your configuration:
<Location "/sonar">
ProxyPass "http://test.com:9000"
</Location>
You need to proxy requests and not redirect them.
Use a ProxyPass directive as mentioned in the official apache proxy documentation
For example add this location block inside your configuration:
<Location "/sonar">
ProxyPass "http://test.com:9000"
</Location>
answered Mar 27 at 10:03
workaroundworkaround
1551 silver badge10 bronze badges
1551 silver badge10 bronze badges
Hi, I tried this but getting a blank page on /sonar context
– Devendra
Mar 28 at 6:19
Check out if your sonar config is set up correctly to receive the proxied requests.
– workaround
Mar 28 at 8:00
add a comment |
Hi, I tried this but getting a blank page on /sonar context
– Devendra
Mar 28 at 6:19
Check out if your sonar config is set up correctly to receive the proxied requests.
– workaround
Mar 28 at 8:00
Hi, I tried this but getting a blank page on /sonar context
– Devendra
Mar 28 at 6:19
Hi, I tried this but getting a blank page on /sonar context
– Devendra
Mar 28 at 6:19
Check out if your sonar config is set up correctly to receive the proxied requests.
– workaround
Mar 28 at 8:00
Check out if your sonar config is set up correctly to receive the proxied requests.
– workaround
Mar 28 at 8:00
add a comment |
Thanks for contributing an answer to Stack Overflow!
- 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%2fstackoverflow.com%2fquestions%2f55371358%2fhow-to-redirect-url-with-port-to-url-with-context%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