|
|
@@ -22,8 +22,76 @@ Simply clone this repository and launch the docker container as explained in the
|
|
|
|
|
|
Safe flying!
|
|
|
|
|
|
+### Nginx configuration example
|
|
|
+ ```text
|
|
|
+server {
|
|
|
+ listen 80;
|
|
|
+ listen [::]:80;
|
|
|
+ server_name ardupilot.equalmass.com;
|
|
|
+ rewrite ^ https://$http_host$request_uri? permanent; # force redirect http to https
|
|
|
+ server_tokens off;
|
|
|
+ }
|
|
|
+
|
|
|
+ server {
|
|
|
+ listen 443 http2;
|
|
|
+ listen [::]:443 http2;
|
|
|
+ ssl on; # Note: If Nginx warns about this on restart, change to 'listen 443 ssl http2;'
|
|
|
+ ssl_certificate /etc/nginx/ssl/equalmass.com.cer;
|
|
|
+ ssl_certificate_key /etc/nginx/ssl/equalmass.com.key;
|
|
|
+ ssl_dhparam /etc/nginx/ssl/dhparam.pem;
|
|
|
+ server_name ardupilot.equalmass.com;
|
|
|
+ ssl_session_timeout 5m;
|
|
|
+
|
|
|
+ ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
|
|
+ ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-CAMELLIA256-SHA:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-SEED-SHA:DHE-RSA-CAMELLIA128-SHA:HIGH:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS';
|
|
|
+ ssl_prefer_server_ciphers on;
|
|
|
+
|
|
|
+ proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
+
|
|
|
+ add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
|
|
|
+ server_tokens off;
|
|
|
+
|
|
|
+ # =========================================================
|
|
|
+ # NEW SIDECAR ROUTING
|
|
|
+ # Intercepts traffic to /patch-manager/ and sends it to port 11081.
|
|
|
+ # The trailing slash on '11081/' is crucial—it strips the prefix
|
|
|
+ # so the FastAPI app receives standard routing requests.
|
|
|
+ # =========================================================
|
|
|
+ location /patch-manager/ {
|
|
|
+ proxy_pass http://192.168.195.4:11081/;
|
|
|
+ proxy_set_header Host $host;
|
|
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
+ proxy_set_header X-Forwarded-Host $server_name;
|
|
|
+ proxy_set_header X-Forwarded-Proto https;
|
|
|
+
|
|
|
+ client_max_body_size 50M; # Allows uploading larger custom files
|
|
|
+ }
|
|
|
+
|
|
|
+ # =========================================================
|
|
|
+ # MAIN ARDUPILOT ROUTING
|
|
|
+ # Handles all standard traffic and sends it to port 11080.
|
|
|
+ # =========================================================
|
|
|
+ location / {
|
|
|
+ proxy_pass http://192.168.195.4:11080;
|
|
|
+ proxy_set_header Host $host;
|
|
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
+ proxy_set_header X-Forwarded-Host $server_name;
|
|
|
+ proxy_set_header X-Forwarded-Proto https;
|
|
|
+
|
|
|
+ access_log /var/log/nginx/ardupilot.access.log;
|
|
|
+ error_log /var/log/nginx/ardupilot.error.log;
|
|
|
+
|
|
|
+ proxy_read_timeout 1200s;
|
|
|
+ client_max_body_size 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
-# ArduPilot Custom Firmware Builder
|
|
|
+ ```
|
|
|
+
|
|
|
+
|
|
|
+# Upstream Firmware Builder documentation
|
|
|
|
|
|
## Table of Contents
|
|
|
1. [Overview](#overview)
|