Hot answers tagged

3

You could use multiple A records, one for each machine. But, regarding your high-availability tag: You won't get this via this technique. Alternatively, you could use Anycast or a Content delivery network aka CDN. SSL may be an issue. Basically can 1 cert work on multiple servers provided they have the same setup? Yes.


3

Varnish does not support SSL Running a site/service on SSL is a necessity for anything half serious, so thats one reason to use haproxy which will do SSL termination for you.


2

Pretty much the same way. location /foo { rewrite ^/foo(.+)$ /$1 break; proxy_pass http://foo; } location /bar { rewrite ^/bar(.+)$ /$1 break; proxy_pass http://bar; }


2

Unless I completely misread your question: You simply set up server blocks for each sub-domain and the define the correct reverse proxy for the root of that subdomain i.e. something along the lines of: server { server_name subdomain1.example.com; location / { proxy_pass http://hostname1:port1; } } server { ...


1

You simply need a new server block with the server_name set to the second domain and a proxy_pass in the location. If you need it to be https you can list either another certificate, or the same certificate if it has the correct alternate names. This is covered in the Nginx beginners guide. server { server_name example.com; listen 80; listen 443 ssl ...


1

If all the devices you want to access are behind a proper firewall, and you have a full infrastructure behind each one to support it, I'd go for Citrix VDI, and put a virtual desktop at each location so you could remotely connect for management and maintenance. In terms of monitoring, PRTG can do what you want. You can have remote probe devices ...


1

While both HAProxy and Varnish can load-balance, only one of them is built for it. You could just use Apache for your purposes as well since it can proxy and cache as well, but it's hardly an optimal solution. In my opinion, you're best to use each product for what it's best at. What I do is install both on the same box and configure Varnish to use ...


1

You would need to create two separate Virtual Hosts, with the different ports you want. You would need <VirtualHost *:8080> ... </VirtualHost> <VirtualHost *:3000> ... </VirtualHost> You also will need to set Apache Listen directives for both those ports Listen 8080, 3000


1

I think you possibly need a content distribution network, rather than another web server trying to serve the same domain. There are a number of CDNs, including CloudFlare, MaxCDN, Amazon CloudFront, Akami, etc. CloudFlare has a free tier which is adequate for some, plus business plans. A CDN can cache pages if it's set up properly. If you want two web ...


1

This is one of the scenarios Nginx explicitely supports, and you would most likely see at least some performance gains due to the improved pipelining, having only a single TLS session to negotiate, etc... assuming your application's architecture is such that it would profit from those benefits. However, beware that some of the oft-used HTTP 1.1 hacks you ...


1

There is no need to put nginx or any other form of load balancer in front of your border SMTP servers. If you don't get the configuration right, it is likely to hurt your ability to successfully deliver mail. Just put your servers in your DMZ. Incoming traffic will be part way through a conversation before you can route it appropriately. IMAP users will ...


1

you are close, but there's no reverse proxy for http configured, only for https (in the above setup) — so it should show default content from document root. First server also lacks ending }. You may configure both http and https in the same block, just use the ssl keyword in the listen directive (under the ssl port, so there's no need to set the ssl on ...


1

With you new (EDIT1) config, any access to machine #2 using http (as opposed to https) will be proxied. Which eliminates the original "Welcome to nginx!" side-effect, which was (probably) caused by a redirect to http scheme. Moving on, I think the root of the problem is machine #3 (the real server 1) generating a redirect which is not being mapped correctly ...


1

It's not clear what you have tried. The first thing I would try is a simple proxypass of /subN to a backend machine <VirtualHost *:80> ProxyPass /sub1 http://192.168.1.1/ ProxyPassReverse /sub1 http://192.168.1.1/ ProxyPass /sub2 http://192.168.1.2/ ProxyPassReverse /sub2 http://192.168.1.2/ ServerName example.com ...


1

Instead of reverse proxying the "ip" address (proxy_pass http://127.0.0.1:9003), try proxy_pass http://YourHostNameBehindReverseProxy:9003. Then add YourHostNameBehindReverseProxy to /etc/hosts and associate with 127.0.0.1.


1

1) Yes, mostly when apache handles slow HTTP clients: apache is designed in a way when its child blocks until he serves one client, thus its unable to serve others. So, if you have lots of clients, apache children will stack, consuming memory/CPU and probably hitting the children cap, making this situation a DoS. 1a) I see none. 1b) Yes, php module is way ...


1

Your proxy redirect looks suspect. Have a look at the documentation, and also at the nginx beginners guide. Basically, try removing everything other than proxy_pass from your location. This is mostly a guess, but it's worth a shot.



Only top voted, non community-wiki answers of a minimum length are eligible