Created
May 23, 2023 18:54
-
-
Save syntaxlexx/eaaca42110d848b194263cb09caa5eb1 to your computer and use it in GitHub Desktop.
Appwrite Nginx config with Realtime Enabled
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
server_name apps.domain2.com; | |
location / { | |
add_header Strict-Transport-Security "max-age=31536000" always; | |
add_header X-Frame-Options deny; | |
proxy_pass http://localhost:8080; | |
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; | |
proxy_redirect off; | |
proxy_buffering off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
} | |
location /v1/realtime { | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-Host $host; | |
proxy_set_header X-Forwarded-Port $server_port; | |
proxy_pass http://localhost:8080; | |
proxy_http_version 1.1; | |
proxy_connect_timeout 7d; | |
proxy_send_timeout 7d; | |
proxy_read_timeout 7d; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
server_name domain.com; | |
location / { | |
add_header Strict-Transport-Security "max-age=31536000" always; | |
add_header X-Frame-Options deny; | |
proxy_pass http://localhost:8080; | |
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; | |
proxy_redirect off; | |
proxy_buffering off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
# for realtime | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Appwrite Config
Port: 8080
SSL: 4443