Tag Info

Hot answers tagged

4

In case you use nginx as a load-balancer, the stream will be : Redirect : Step 1 : Client => LB (HTTP request) Step 2 : LB => Client (HTTP reply) Step 3 : Client => Backend (HTTP request) Step 4 : Backend => Client (HTTP reply) Proxy : Step 1 : Client => LB (HTTP request) Step 2 : LB => Backend (HTTP request) ...


1

What is your public facing edge router? Based on the port request you can forward to the proper server. You will need to detect host header to know which website to point to in the case of 80 and 443. URL rewrite I would only use on the same server and not to redirect to a separate server. Under your desired approach you would forwarding to a windows ...


1

You are using the rewrite directive wrong. You don't use if with the rewrite rules. You should write your current rules like this: rewrite ^/gps$ /gps.lf.ws.vh.sprite.php break; rewrite ^/setup$ /admin.php break; rewrite ^/error$ /gttindex.php?WARNING=wrongcredentials break; And most likely you should use last instead of break in the rules. Regarding ...


1

I've discovered that you cannot have a variable in the RewriteCond regex, because it seems it is only compiled once, but not per-request. You could workaround this by putting both ${lookup} and %{REQUEST_URI} in a test string using a separator (let's say a comma) and then make sure they are equal, e.g : RewriteCond %{REQUEST_URI},/${lookup:/$1/}/$2 ...


1

I went to regex101.com to test and this regex ^(.*)\/(.*)(_)[0,1](.*)\.(.+)$ matched for string /static/images/00f37ac6291bb6e8_150.jpeg. With this match $1/$2.$5 would be the path to the larger image.


1

This works for me: server { listen 80; server_name www.yourdomain.com yourdomain.com; return 301 https://yourdomain.com$request_uri; } server { listen 443 ssl; server_name www.yourdomain.com; ssl_certificate /path/to/certificate.crt; ssl_certificate_key ...



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