Redirect port 5000 OSRM a subdomain in Apache2How would I broadcast a subdomain/virtual name on a local...

Not a Long-Winded Riddle

Does an Eldritch Knight's Weapon Bond protect him from losing his weapon to a Telekinesis spell?

Is there a way to not have to poll the UART of an AVR?

When obtaining gender reassignment/plastic surgery overseas, is an emergency travel document required to return home?

What to do with threats of blacklisting?

How big is a framed opening for a door relative to the finished door opening width?

Why is that max-Q doesn't occur in transonic regime?

Which RAF squadrons and aircraft types took part in the bombing of Berlin on the 25th of August 1940?

Does the US government have any planning in place to ensure there's no shortages of food, fuel, steel and other commodities?

Single-row INSERT...SELECT much slower than separate SELECT

Can a player sacrifice a creature after declaring that creature as blocker while taking lethal damage?

Plausible reason to leave the Solar System?

Need help with a circuit diagram where the motor does not seem to have any connection to ground. Error with diagram? Or am i missing something?

Article. The word "Respect"

How to write cases in LaTeX?

Is `Object` a function in javascript?

A fantasy book with seven white haired women on the cover

How to not let the Identify spell spoil everything?

How is this property called for mod?

Can you determine if focus is sharp without diopter adjustment if your sight is imperfect?

Book where a space ship journeys to the center of the galaxy to find all the stars had gone supernova

"Starve to death" Vs. "Starve to the point of death"

Why didn't Tom Riddle take the presence of Fawkes and the Sorting Hat as more of a threat?

Does it take energy to move something in a circle?



Redirect port 5000 OSRM a subdomain in Apache2


How would I broadcast a subdomain/virtual name on a local server with people connected to the same networkWhy dont ProxyPass work in Apache hardy box with virtual hosts?Getting Started with ZendIs this a correct way to enable htaccess in Apache 2.4.7Apache custom errorsI'm getting this “You should replace this file (located at /var/www/html/index.html)” after update to v14.4 ubuntuWhy 403 Forbidden error When changing root directory of Apache to another drive?ap_proxy_connect_backend disabling worker for IPGet Apache2 running with nginx as reverse proxyHTTP redirects to main domain, but not HTTPS













1















Little description:
Redirect port 5000 to a subdomain



Description:
Well I have a program, "supervisor" It has a OSRM (open street routing map), It is running in port 5000, I want to redirect that port to a subdomain example.mywebsite.com, all with Apache



My SO: is Ubuntu 14.04.4 LTS



Apache version: Apache/2.4.7 (Ubuntu)



I have a file for every subdomain in : /etc/apache2/sites-available/



I want a file for my problem there...



I don't know how to do It.
This will help another, and I'm doing a tuto of installing nominatim, and osrm, with apache...










share|improve this question



























    1















    Little description:
    Redirect port 5000 to a subdomain



    Description:
    Well I have a program, "supervisor" It has a OSRM (open street routing map), It is running in port 5000, I want to redirect that port to a subdomain example.mywebsite.com, all with Apache



    My SO: is Ubuntu 14.04.4 LTS



    Apache version: Apache/2.4.7 (Ubuntu)



    I have a file for every subdomain in : /etc/apache2/sites-available/



    I want a file for my problem there...



    I don't know how to do It.
    This will help another, and I'm doing a tuto of installing nominatim, and osrm, with apache...










    share|improve this question

























      1












      1








      1








      Little description:
      Redirect port 5000 to a subdomain



      Description:
      Well I have a program, "supervisor" It has a OSRM (open street routing map), It is running in port 5000, I want to redirect that port to a subdomain example.mywebsite.com, all with Apache



      My SO: is Ubuntu 14.04.4 LTS



      Apache version: Apache/2.4.7 (Ubuntu)



      I have a file for every subdomain in : /etc/apache2/sites-available/



      I want a file for my problem there...



      I don't know how to do It.
      This will help another, and I'm doing a tuto of installing nominatim, and osrm, with apache...










      share|improve this question














      Little description:
      Redirect port 5000 to a subdomain



      Description:
      Well I have a program, "supervisor" It has a OSRM (open street routing map), It is running in port 5000, I want to redirect that port to a subdomain example.mywebsite.com, all with Apache



      My SO: is Ubuntu 14.04.4 LTS



      Apache version: Apache/2.4.7 (Ubuntu)



      I have a file for every subdomain in : /etc/apache2/sites-available/



      I want a file for my problem there...



      I don't know how to do It.
      This will help another, and I'm doing a tuto of installing nominatim, and osrm, with apache...







      server apache2 proxy port-forwarding reverse-proxy






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jun 13 '16 at 19:19









      DarckBlezzerDarckBlezzer

      240411




      240411






















          1 Answer
          1






          active

          oldest

          votes


















          2














          Well you have the service running in port 5000, you want to show,proxy you service that is in 127.0.0.1:5000 or in mywebsite.com:5000 to a subdomain or domain like osrm.mywebsite.com or myosrmwebsite.com



          You'll need to enable mod_proxy in Apache2 first. So run these commands as root, or sudo:



          a2enmod proxy
          a2enmod proxy_http


          Edit your hosts file



          # if you don't have access try with sudo
          nano /etc/hosts


          Add entry to your hosts file



          # path /etc/hosts
          127.0.0.1 subdomainname.mywebsite.com
          87.164.25.1 subdomainname.mywebsite.com


          The 87.164.25.1 is an example of ip public it isn't real



          After this we need to go to /etc/apache2/sites-available



          cd /etc/apache2/sites-available


          Create a file *.conf for our subdomain or domain



          nano subdomainname.mywebsite.com.conf


          In this file we are going to create a config to proxy our port to servername



          #filename 'subdomainname.mywebsite.com.conf'
          #dir /etc/apache2/sites-available
          <VirtualHost *:80>
          ServerName osrm.website.com # my subdomain or website name server
          ProxyPass / http://localhost:5000/
          ProxyPassReverse / http://localhost:5000/
          ProxyRequests Off

          ErrorLog ${APACHE_LOG_DIR}/error.log
          CustomLog ${APACHE_LOG_DIR}/access.log combined
          </VirtualHost>


          note: If when you try to see the website through the url, and nothing happened, try change <VirtualHost *:80> to <VirtualHost 87.164.25.1:80> the ip that server has.



          Add the *.conf file to apache with this command, and check the list of commands.



          To enable it



          sudo a2ensite subdomainname.mywebsite.com.conf


          To disable it



          sudo a2dissite subdomainname.mywebsite.com.conf


          To list all sites enables



          # if you want to know what sites are enables.. or check if it is enable
          apache2ctl -S


          To reload apache or restart



          # only reload the config files without restart
          sudo service apache2 reload

          # restart apache
          sudo service apache2 restart





          Websites of reference




          1. How to setup subdomain on Ubuntu Server 14.04

          2. Get a list of all virtual hosts which are defined in all apache configuration files

          3. Proxy port to site - example No. 1 - https://serverfault.com/a/140161

          4. Proxy port to site - example No. 2 - http://freedif.org/how-to-redirect-a-port-to-a-sub-domain-proxypass/

          5. Proxy port to site - example No. 3 - https://stackoverflow.com/a/8442270/5287072

          6. Proxy port to site - example No. 4 - https://stackoverflow.com/a/589479/5287072


          * I put a title and url if for some reason it fail...






          share|improve this answer


























          • Thank you!!! I followed every step and it works like a charm. I was forwarding to my SpringBoot application running at port 9582. Just a side note though, make sure you put a forward slash in front of your 8080 otherwise the reverse proxy would struggle.

            – kholofelo Maloma
            yesterday











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          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%2faskubuntu.com%2fquestions%2f786564%2fredirect-port-5000-osrm-a-subdomain-in-apache2%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









          2














          Well you have the service running in port 5000, you want to show,proxy you service that is in 127.0.0.1:5000 or in mywebsite.com:5000 to a subdomain or domain like osrm.mywebsite.com or myosrmwebsite.com



          You'll need to enable mod_proxy in Apache2 first. So run these commands as root, or sudo:



          a2enmod proxy
          a2enmod proxy_http


          Edit your hosts file



          # if you don't have access try with sudo
          nano /etc/hosts


          Add entry to your hosts file



          # path /etc/hosts
          127.0.0.1 subdomainname.mywebsite.com
          87.164.25.1 subdomainname.mywebsite.com


          The 87.164.25.1 is an example of ip public it isn't real



          After this we need to go to /etc/apache2/sites-available



          cd /etc/apache2/sites-available


          Create a file *.conf for our subdomain or domain



          nano subdomainname.mywebsite.com.conf


          In this file we are going to create a config to proxy our port to servername



          #filename 'subdomainname.mywebsite.com.conf'
          #dir /etc/apache2/sites-available
          <VirtualHost *:80>
          ServerName osrm.website.com # my subdomain or website name server
          ProxyPass / http://localhost:5000/
          ProxyPassReverse / http://localhost:5000/
          ProxyRequests Off

          ErrorLog ${APACHE_LOG_DIR}/error.log
          CustomLog ${APACHE_LOG_DIR}/access.log combined
          </VirtualHost>


          note: If when you try to see the website through the url, and nothing happened, try change <VirtualHost *:80> to <VirtualHost 87.164.25.1:80> the ip that server has.



          Add the *.conf file to apache with this command, and check the list of commands.



          To enable it



          sudo a2ensite subdomainname.mywebsite.com.conf


          To disable it



          sudo a2dissite subdomainname.mywebsite.com.conf


          To list all sites enables



          # if you want to know what sites are enables.. or check if it is enable
          apache2ctl -S


          To reload apache or restart



          # only reload the config files without restart
          sudo service apache2 reload

          # restart apache
          sudo service apache2 restart





          Websites of reference




          1. How to setup subdomain on Ubuntu Server 14.04

          2. Get a list of all virtual hosts which are defined in all apache configuration files

          3. Proxy port to site - example No. 1 - https://serverfault.com/a/140161

          4. Proxy port to site - example No. 2 - http://freedif.org/how-to-redirect-a-port-to-a-sub-domain-proxypass/

          5. Proxy port to site - example No. 3 - https://stackoverflow.com/a/8442270/5287072

          6. Proxy port to site - example No. 4 - https://stackoverflow.com/a/589479/5287072


          * I put a title and url if for some reason it fail...






          share|improve this answer


























          • Thank you!!! I followed every step and it works like a charm. I was forwarding to my SpringBoot application running at port 9582. Just a side note though, make sure you put a forward slash in front of your 8080 otherwise the reverse proxy would struggle.

            – kholofelo Maloma
            yesterday
















          2














          Well you have the service running in port 5000, you want to show,proxy you service that is in 127.0.0.1:5000 or in mywebsite.com:5000 to a subdomain or domain like osrm.mywebsite.com or myosrmwebsite.com



          You'll need to enable mod_proxy in Apache2 first. So run these commands as root, or sudo:



          a2enmod proxy
          a2enmod proxy_http


          Edit your hosts file



          # if you don't have access try with sudo
          nano /etc/hosts


          Add entry to your hosts file



          # path /etc/hosts
          127.0.0.1 subdomainname.mywebsite.com
          87.164.25.1 subdomainname.mywebsite.com


          The 87.164.25.1 is an example of ip public it isn't real



          After this we need to go to /etc/apache2/sites-available



          cd /etc/apache2/sites-available


          Create a file *.conf for our subdomain or domain



          nano subdomainname.mywebsite.com.conf


          In this file we are going to create a config to proxy our port to servername



          #filename 'subdomainname.mywebsite.com.conf'
          #dir /etc/apache2/sites-available
          <VirtualHost *:80>
          ServerName osrm.website.com # my subdomain or website name server
          ProxyPass / http://localhost:5000/
          ProxyPassReverse / http://localhost:5000/
          ProxyRequests Off

          ErrorLog ${APACHE_LOG_DIR}/error.log
          CustomLog ${APACHE_LOG_DIR}/access.log combined
          </VirtualHost>


          note: If when you try to see the website through the url, and nothing happened, try change <VirtualHost *:80> to <VirtualHost 87.164.25.1:80> the ip that server has.



          Add the *.conf file to apache with this command, and check the list of commands.



          To enable it



          sudo a2ensite subdomainname.mywebsite.com.conf


          To disable it



          sudo a2dissite subdomainname.mywebsite.com.conf


          To list all sites enables



          # if you want to know what sites are enables.. or check if it is enable
          apache2ctl -S


          To reload apache or restart



          # only reload the config files without restart
          sudo service apache2 reload

          # restart apache
          sudo service apache2 restart





          Websites of reference




          1. How to setup subdomain on Ubuntu Server 14.04

          2. Get a list of all virtual hosts which are defined in all apache configuration files

          3. Proxy port to site - example No. 1 - https://serverfault.com/a/140161

          4. Proxy port to site - example No. 2 - http://freedif.org/how-to-redirect-a-port-to-a-sub-domain-proxypass/

          5. Proxy port to site - example No. 3 - https://stackoverflow.com/a/8442270/5287072

          6. Proxy port to site - example No. 4 - https://stackoverflow.com/a/589479/5287072


          * I put a title and url if for some reason it fail...






          share|improve this answer


























          • Thank you!!! I followed every step and it works like a charm. I was forwarding to my SpringBoot application running at port 9582. Just a side note though, make sure you put a forward slash in front of your 8080 otherwise the reverse proxy would struggle.

            – kholofelo Maloma
            yesterday














          2












          2








          2







          Well you have the service running in port 5000, you want to show,proxy you service that is in 127.0.0.1:5000 or in mywebsite.com:5000 to a subdomain or domain like osrm.mywebsite.com or myosrmwebsite.com



          You'll need to enable mod_proxy in Apache2 first. So run these commands as root, or sudo:



          a2enmod proxy
          a2enmod proxy_http


          Edit your hosts file



          # if you don't have access try with sudo
          nano /etc/hosts


          Add entry to your hosts file



          # path /etc/hosts
          127.0.0.1 subdomainname.mywebsite.com
          87.164.25.1 subdomainname.mywebsite.com


          The 87.164.25.1 is an example of ip public it isn't real



          After this we need to go to /etc/apache2/sites-available



          cd /etc/apache2/sites-available


          Create a file *.conf for our subdomain or domain



          nano subdomainname.mywebsite.com.conf


          In this file we are going to create a config to proxy our port to servername



          #filename 'subdomainname.mywebsite.com.conf'
          #dir /etc/apache2/sites-available
          <VirtualHost *:80>
          ServerName osrm.website.com # my subdomain or website name server
          ProxyPass / http://localhost:5000/
          ProxyPassReverse / http://localhost:5000/
          ProxyRequests Off

          ErrorLog ${APACHE_LOG_DIR}/error.log
          CustomLog ${APACHE_LOG_DIR}/access.log combined
          </VirtualHost>


          note: If when you try to see the website through the url, and nothing happened, try change <VirtualHost *:80> to <VirtualHost 87.164.25.1:80> the ip that server has.



          Add the *.conf file to apache with this command, and check the list of commands.



          To enable it



          sudo a2ensite subdomainname.mywebsite.com.conf


          To disable it



          sudo a2dissite subdomainname.mywebsite.com.conf


          To list all sites enables



          # if you want to know what sites are enables.. or check if it is enable
          apache2ctl -S


          To reload apache or restart



          # only reload the config files without restart
          sudo service apache2 reload

          # restart apache
          sudo service apache2 restart





          Websites of reference




          1. How to setup subdomain on Ubuntu Server 14.04

          2. Get a list of all virtual hosts which are defined in all apache configuration files

          3. Proxy port to site - example No. 1 - https://serverfault.com/a/140161

          4. Proxy port to site - example No. 2 - http://freedif.org/how-to-redirect-a-port-to-a-sub-domain-proxypass/

          5. Proxy port to site - example No. 3 - https://stackoverflow.com/a/8442270/5287072

          6. Proxy port to site - example No. 4 - https://stackoverflow.com/a/589479/5287072


          * I put a title and url if for some reason it fail...






          share|improve this answer















          Well you have the service running in port 5000, you want to show,proxy you service that is in 127.0.0.1:5000 or in mywebsite.com:5000 to a subdomain or domain like osrm.mywebsite.com or myosrmwebsite.com



          You'll need to enable mod_proxy in Apache2 first. So run these commands as root, or sudo:



          a2enmod proxy
          a2enmod proxy_http


          Edit your hosts file



          # if you don't have access try with sudo
          nano /etc/hosts


          Add entry to your hosts file



          # path /etc/hosts
          127.0.0.1 subdomainname.mywebsite.com
          87.164.25.1 subdomainname.mywebsite.com


          The 87.164.25.1 is an example of ip public it isn't real



          After this we need to go to /etc/apache2/sites-available



          cd /etc/apache2/sites-available


          Create a file *.conf for our subdomain or domain



          nano subdomainname.mywebsite.com.conf


          In this file we are going to create a config to proxy our port to servername



          #filename 'subdomainname.mywebsite.com.conf'
          #dir /etc/apache2/sites-available
          <VirtualHost *:80>
          ServerName osrm.website.com # my subdomain or website name server
          ProxyPass / http://localhost:5000/
          ProxyPassReverse / http://localhost:5000/
          ProxyRequests Off

          ErrorLog ${APACHE_LOG_DIR}/error.log
          CustomLog ${APACHE_LOG_DIR}/access.log combined
          </VirtualHost>


          note: If when you try to see the website through the url, and nothing happened, try change <VirtualHost *:80> to <VirtualHost 87.164.25.1:80> the ip that server has.



          Add the *.conf file to apache with this command, and check the list of commands.



          To enable it



          sudo a2ensite subdomainname.mywebsite.com.conf


          To disable it



          sudo a2dissite subdomainname.mywebsite.com.conf


          To list all sites enables



          # if you want to know what sites are enables.. or check if it is enable
          apache2ctl -S


          To reload apache or restart



          # only reload the config files without restart
          sudo service apache2 reload

          # restart apache
          sudo service apache2 restart





          Websites of reference




          1. How to setup subdomain on Ubuntu Server 14.04

          2. Get a list of all virtual hosts which are defined in all apache configuration files

          3. Proxy port to site - example No. 1 - https://serverfault.com/a/140161

          4. Proxy port to site - example No. 2 - http://freedif.org/how-to-redirect-a-port-to-a-sub-domain-proxypass/

          5. Proxy port to site - example No. 3 - https://stackoverflow.com/a/8442270/5287072

          6. Proxy port to site - example No. 4 - https://stackoverflow.com/a/589479/5287072


          * I put a title and url if for some reason it fail...







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 6 hours ago

























          answered Jun 13 '16 at 19:19









          DarckBlezzerDarckBlezzer

          240411




          240411













          • Thank you!!! I followed every step and it works like a charm. I was forwarding to my SpringBoot application running at port 9582. Just a side note though, make sure you put a forward slash in front of your 8080 otherwise the reverse proxy would struggle.

            – kholofelo Maloma
            yesterday



















          • Thank you!!! I followed every step and it works like a charm. I was forwarding to my SpringBoot application running at port 9582. Just a side note though, make sure you put a forward slash in front of your 8080 otherwise the reverse proxy would struggle.

            – kholofelo Maloma
            yesterday

















          Thank you!!! I followed every step and it works like a charm. I was forwarding to my SpringBoot application running at port 9582. Just a side note though, make sure you put a forward slash in front of your 8080 otherwise the reverse proxy would struggle.

          – kholofelo Maloma
          yesterday





          Thank you!!! I followed every step and it works like a charm. I was forwarding to my SpringBoot application running at port 9582. Just a side note though, make sure you put a forward slash in front of your 8080 otherwise the reverse proxy would struggle.

          – kholofelo Maloma
          yesterday


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Ask Ubuntu!


          • 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%2faskubuntu.com%2fquestions%2f786564%2fredirect-port-5000-osrm-a-subdomain-in-apache2%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

          List of shipwrecks in 1808...

          Is there a lightweight tool to crop images quickly?Cropping Images using Command Line Tools OnlyHow to crop...

          Unit packagekit.service is masked Announcing the arrival of Valued Associate #679: Cesar...