proxy_pass http://192.168.0.1/ for each server_name, and retain the Host: header.by AnrDaemon - How to...
Upsteam specifies SERVERS not URL's. For nginx specific pastes, you can use https://paste.ngx.cc/by AnrDaemon - How to...
You could try using proxy protocol. Though I'm unsure about it in case of SSL connection.by AnrDaemon - How to...
POST and PUT by definition are NOT static methods. Your question contradicts your initial statement of wanting to serve static content.by AnrDaemon - How to...
Despite documentation claiming that `$request_uri` is a "full original request URI (with arguments)", nginx in reality reduces it to path+query only. I see why it does that, for the configuration purposes, but for my use case, I'd like to pass an actual request URI to the backend. Is there a way?by AnrDaemon - How to...
Found my mistake. I've had if (!-f $document_root$fastcgi_script_name) { return 404; } hidden deep within includes. Didn't notice it until now.by AnrDaemon - How to...
No, the problem is different, because protocols are inherently different. SSH is easily proxied. FTP is not.by AnrDaemon - How to...
I strongly suggest eradicating FTP with extreme prejudice. Use SFTP or SCP at least.by AnrDaemon - How to...
upstream site-main-5.6 { server php-5-6.example.org:1008; } server { listen 80; server_name site-main.example.org; root "/home/site-main/htdocs"; location ^~ /gallery/test/ { default_type "text/plain"; #return 200 "@app root."; try_files $uri @app; autoindex off; } location @app {by AnrDaemon - How to...
Worked around it in two steps. 1. Created an unrelated catch-all vhost. 2. In real hosts used $http_host instead of $server_name where necessary, since $http_host will always match to one of the server names, given #1.by AnrDaemon - Migration from Other Servers
I've now been bitten by the same issue. So, let me clarify the question: How to pass correct SERVER_NAME to the CGI interpreter? With "correct" being "the one matching HTTP_HOST, or the first entry from server_name othervise". Use case is, I have two names for a server. One I use in my local network for development, and one I use to show the site to the outside world. Builby AnrDaemon - Migration from Other Servers