31 thoughts on “Configuring multiple applications on same port using nginx reverse proxy based on request urls

  1. simple example, and easy to understand. Thank you. (But you can probably edit the video and remove all the beating around the bush till 5:25)

  2. learn how to actually host multiple apps then come back make a video. cheap cheating by changing url and manually running 3 times 3 apps

  3. How can I serve few pages of my application through Angular when entire App is built on top of Angular JS?

  4. hi
    nginx server is running successfully
    but when add location /codify and rewrite code then i got internal server error
    any body help

  5. Hello! How can I contact you? Please, help me! 🙂
    I need to map my domain with IP + PORT.

  6. Us Salamo Alaekum bhai, i have to do a task
    i have three dashbo ards
    user
    vendor
    admin
    i have installed nginx on server and have kept their respective files in var/www/html
    i want when i do
    ip => then it should land on USER
    ip/vendor => should land on vendor
    ip/admin => should land on admin
    they are not running on any port rather they are just dist files

  7. Nginx is running in my environment as a load balancer 2 web servers. If both web servers fail to serve a request or are down for some reason. Can nginx return a static page. Is this possible ?

  8. Hi, it worked when i used locations as /, /codify, /linker but when i tried to put the location as /codify/linker it's not working.. how write the location and rewrite line of code in that case

  9. 7:01 shouldn't you include the "/" in the rewrite rule? Otherwise the url "http://localhost/codifynews" would be forwarded to "http://127.0.0.1:3001/news", but you only would want to do that for "http://localhost/codify/news", because the other one wasn't meant for your codify app.

  10. this is cool, but my all static file (/stylesheets/style.css etc.) in the second app to be broke, can you tell me how to fix it? thanks

  11. I want to do something similar to this.
    My situation:
    Nginx webserver hosted at home on my server, running multiple servers blocks on the SAME port. site1.example.com, site2.example.com and site3.example.com.
    I installed Nginx on a VPS to use it as a reverse proxy for my 3 sites on the SAME port. How can i do this? I already tried your config, but it won't work if all 3 files in "sites-enabled" have the same port.

    Thanks!

  12. Thanks for the tutorial, I have a query. We can route a request depending upon the url path in the app itself. So, what benefit it holds doing it in nginx ? like

    in app:

    app.get('/codify', function () {# codify code} )

    app.get('/linker', function () {# linkercode} )

  13. I cannot get my reverse proxy to work using the above youtube video

    I have multiple web hosted on different VM server on a same machine. Example

    Main Server, IP ADDRESS: 192.168.1.3, Window 10 running Oracle VirtualBox

    VM1, UBUNTU, IP ADDRESS: 192.168.1.12, WordPress

    VM2, UBUNTU, IP ADDRESS: 192.168.1.13, PLEX

    VM3, UBUNTU, IP ADDRESS: 192.168.1.14, Owncloud

    I have a free domain name called lioville.ddns.net and this is DDNS onto my WAN IP address. I have only 1 WAN IP address from my ISP

    My question is how do I create a sub-directory to point to WAN IP address which in turn point to different IP address? For example

    lioville.ddns.net/VM1 -> WAN IP ->92.168.1.12

    lioville.ddns.net/VM2 -> WAN IP ->192.168.1.13

    lioville.ddns.net/VM3 -> WAN IP ->192.168.1.14

Leave a Reply

Your email address will not be published. Required fields are marked *