1
1
Fork 0
friendica_2019-12_sharedHos.../mods/sample-nginx-reverse-proxy.config

31 lines
557 B
Plaintext
Raw Normal View History

#
# Example of NGINX as reverse-proxy terminating an HTTPS connection.
#
# This is not a complete NGINX config.
#
# Please refer to NGINX docs
#
...
server {
...
# assuming Friendica runs on port 8080
location / {
if ( $scheme != https ) {
# Force Redirect to HTTPS
return 302 https://$host$uri;
}
proxy_pass http://localhost:8080;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Forwarded "for=$proxy_add_x_forwarded_for; proto=$scheme";
}
...
}