ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Reverse Proxy?

    Scheduled Pinned Locked Moved IT Discussion
    17 Posts 5 Posters 3.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by

      A bit busy at the moment but I can grab some code samples for you shortly.

      Are you going to install NGinX to a new VM (vny-lnx-rprox) or to one of the same VMs as one of the other services?

      1 Reply Last reply Reply Quote 0
      • A
        Alex Sage
        last edited by

        @scottalanmiller I would think it would make since to add it on my webserver? If not, I have made a new VM too. What would you do?

        scottalanmillerS 1 Reply Last reply Reply Quote 0
        • W
          WingCreative
          last edited by

          This might give you some helpful info to use as a jumping off point...

          Good luck!

          1 Reply Last reply Reply Quote 0
          • scottalanmillerS
            scottalanmiller @Alex Sage
            last edited by

            @anonymous said:

            @scottalanmiller I would think it would make since to add it on my webserver? If not, I have made a new VM too. What would you do?

            What is the web server currently doing? Is it an Apache node?

            1 Reply Last reply Reply Quote 0
            • A
              Alex Sage
              last edited by

              @scottalanmiller basic LAMP stack running WordPress for 5 domains using virtual hosts.

              1 Reply Last reply Reply Quote 0
              • scottalanmillerS
                scottalanmiller
                last edited by

                Okay. To put NGinX on there, you will need to move Apache to another port. Say 8080, for example. NGinX will get 80 and will then basically do NAT for you to 8080.

                1 Reply Last reply Reply Quote 0
                • W
                  WingCreative
                  last edited by

                  Here's a step-by-step guide for moving Apache to another port (8080, in fact) and setting up nginx as a reverse proxy for Apache on the same server.

                  1 Reply Last reply Reply Quote 1
                  • scottalanmillerS
                    scottalanmiller
                    last edited by

                    Here is a sample of a site config from the /etc/nginx/sites-available folder on Ubuntu 15.04.

                    cat yoursitename.conf 
                    server {
                    	client_max_body_size 40M;
                            listen 80;
                    
                            server_name www.yoursitename.com;
                    
                    	location / {
                            	proxy_set_header X-Real-IP $remote_addr;
                            	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                            	proxy_set_header Host $http_host;
                            	proxy_set_header X-NginX-Proxy true;
                    
                            proxy_pass http://127.0.0.1:8080/;
                            proxy_redirect off;
                    
                    	}
                    }
                    

                    127.0.0.1 is because this is the one running on the same machine. If you need to point to one on a different VM, just put the VM's IP address in that spot.

                    1 Reply Last reply Reply Quote 2
                    • A
                      Alex Sage
                      last edited by Alex Sage

                      @scottalanmiller

                      I see a bunch of fields here. The only ones I would need to edit is server_name and proxy_pass?

                      Then just copy and paste to create more sites?

                      scottalanmillerS 1 Reply Last reply Reply Quote 0
                      • scottalanmillerS
                        scottalanmiller @Alex Sage
                        last edited by

                        @anonymous said:

                        @scottalanmiller

                        I see a bunch of fields here. The only ones I would need to edit is server_name and proxy_pass?

                        Then just copy and paste to create more sites?

                        Correct.

                        1 Reply Last reply Reply Quote 0
                        • JaredBuschJ
                          JaredBusch
                          last edited by

                          I hate searching this site...

                          I swear there was a thread with a walk through on setting up nginx as a proxy for multiple servers....

                          Anyone know where it is?

                          1 Reply Last reply Reply Quote 0
                          • 1 / 1
                          • First post
                            Last post