Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

38 lines
760 B

  1. #
  2. # Example of NGINX as reverse-proxy terminating an HTTPS connection.
  3. #
  4. # This is not a complete NGINX config.
  5. #
  6. # Please refer to NGINX docs
  7. #
  8. # Note provided by Gabe R.: if you are using nginx as proxy server for Apache2
  9. # make sure your nginx config DOES NOT contain the following
  10. # -----
  11. # location ~ /.well-known {
  12. # allow all;
  13. # }
  14. # -----
  15. ...
  16. server {
  17. ...
  18. # assuming Friendica runs on port 8080
  19. location / {
  20. if ( $scheme != https ) {
  21. # Force Redirect to HTTPS
  22. return 302 https://$host$uri;
  23. }
  24. proxy_pass http://localhost:8080;
  25. proxy_redirect off;
  26. proxy_set_header Host $host;
  27. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  28. proxy_set_header Forwarded "for=$proxy_add_x_forwarded_for; proto=$scheme";
  29. }
  30. ...
  31. }