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;








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










share|improve this question






























    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










    share|improve this question


























      0












      0








      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










      share|improve this question














      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 27 at 6:51









      DevendraDevendra

      358 bronze badges




      358 bronze badges

























          2 Answers
          2






          active

          oldest

          votes


















          0














          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/






          share|improve this answer

























          • 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


















          0














          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>





          share|improve this answer

























          • 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














          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
          );



          );













          draft saved

          draft discarded


















          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









          0














          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/






          share|improve this answer

























          • 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















          0














          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/






          share|improve this answer

























          • 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













          0












          0








          0







          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/






          share|improve this answer













          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/







          share|improve this answer












          share|improve this answer



          share|improve this answer










          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











          • Does http://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











          • Does http://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













          0














          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>





          share|improve this answer

























          • 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
















          0














          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>





          share|improve this answer

























          • 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














          0












          0








          0







          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>





          share|improve this answer













          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>






          share|improve this answer












          share|improve this answer



          share|improve this answer










          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


















          • 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


















          draft saved

          draft discarded
















































          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.




          draft saved


          draft discarded














          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





















































          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







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현