Tag Info

Hot answers tagged

2

There are 2 options: rewrite and HTTP 301 permanent redirect, second is more preferred: server { listen 80; server_name _; return 301 https://$server_name$request_uri; }


1

Do you get all 404s on requests to resources under /assets? I suspect you may want to change root to alias in location /assets, because root appends the entire request path to the directory specified, which means nginx is looking for /var/www/frappe/sites/assets/assets/site.css, for instance.


1

Use alias instead of root. You don't even need try_files? location /assets/ { alias /var/www/frappe/sites/assets/; }


1

You could use socat to forward that port to your game server: socat UDP4-RECVFROM:27015,fork UDP4-SENDTO:x.x.x.x:27015 Note that x.x.x.x will see the requests coming from your reverse proxy. It won't see the original IP address. Also, no idea what performance implications this has.


1

Here is an official Nginx Video on YouTube which demonstrates Inline Content Rewriting. https://youtu.be/7Y7ORypoHhE?t=20m22s Indeed with sub_filter http://nginx.org/en/docs/http/ngx_http_sub_module.html In your case, you're looking at something like: location / { sub_filter_once off; sub_filter_types text/html; sub_filter ...


1

It's a relatively basic configuration -- just load mod_deflate and configure it (SetOutputfilter, AddOutputFilterByType, etc) as the manual for mod_deflate describes.


1

There is a workaround for this. Idea is to make a proxy server block for each upstream. upsteam api_servers { server 127.0.1.1; server 127.0.1.2; server 192.168.1.3; } server { listen 127.0.1.1; location / { proxy_pass http://192.168.1.1/api/; } } server { listen 127.0.1.2; location / { proxy_pass ...


1

Looks like you just need to load mod_proxy_http.


1

This is possible. On Apache web server, you need to store all the files on a default virtual host so it can be accessed as http://IP_ADDRESS:PORT/hostname/path/ On Nginx server create multiple virtual hosts & add a proy_pass rule like below. A.com -> / will proxy forward to /a-com/ B.com -> / will proxy forward to /b-com/ C.com -> / will proxy forward ...


1

In Apache 2.4.7, x86_64, Ubuntu 14.04 LTS I have found that this works RequestHeader setIfEmpty X-Forwarded-For "127.0.0.1" works all day long. However if one tries to use a dynamic value, RequestHeader setIfEmpty X-Forwarded-For "%{REMOTE_ADDR}e" does not work. I have found that you need the help of mod_rewrite to harvest the ...


1

I hit this error and it was because I was setting the Host header wrong. Here's the config that ended up working: set $s3_bucket 's3-us-west-1.amazonaws.com'; ... proxy_set_header Host $s3_bucket; Note that the host header does not include http/https. That should be included in the proxy_pass line proxy_pass ...


1

From my reading of the nginx websocket dock, when your nginx proxy sees the Upgrade headers, it passes them on to hack.chat. hack.chat then needs to respond with the 101 response. First of all, you want to be able to debug the actual HTTP and hack.chat transactions, so you know whether the problem is in your client app, or on the web server, or with the ...



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