mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-07 15:54:26 +02:00
Move Nginx reverse proxy sample from INSTALL to separate file
This commit is contained in:
parent
710822dca7
commit
fbb905a5c2
2 changed files with 30 additions and 12 deletions
30
mods/sample-nginx-reverse-proxy.config
Normal file
30
mods/sample-nginx-reverse-proxy.config
Normal file
|
@ -0,0 +1,30 @@
|
|||
#
|
||||
# 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";
|
||||
}
|
||||
|
||||
...
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue