2 # Example of NGINX as reverse-proxy terminating an HTTPS connection.
4 # This is not a complete NGINX config.
6 # Please refer to NGINX docs
9 # Note provided by Gabe R.: if you are using nginx as proxy server for Apache2
10 # make sure your nginx config DOES NOT contain the following
12 # location ~ /.well-known {
22 # assuming Friendica runs on port 8080
24 if ( $scheme != https ) {
25 # Force Redirect to HTTPS
26 return 302 https://$host$uri;
28 proxy_pass http://localhost:8080;
30 proxy_set_header Host $host;
31 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
32 proxy_set_header Forwarded "for=$proxy_add_x_forwarded_for; proto=$scheme";