Reverse Proxy?
-
@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?
-
-
@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?
-
@scottalanmiller basic LAMP stack running WordPress for 5 domains using virtual hosts.
-
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.
-
-
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.
-
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?
-
@anonymous said:
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.
-
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?