mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 09:18:00 +01:00
a8c17e5d05
* Fix Add-On host network mode * Split up esphomeyaml tests * Fix perms * Fix * Add esphomeyaml_version option * Revert change to travis.yml
46 lines
1.2 KiB
Nginx Configuration File
Executable file
46 lines
1.2 KiB
Nginx Configuration File
Executable file
worker_processes 1;
|
|
pid /var/run/nginx.pid;
|
|
error_log stderr;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
access_log stdout;
|
|
include mime.types;
|
|
default_type application/octet-stream;
|
|
sendfile on;
|
|
keepalive_timeout 65;
|
|
|
|
upstream esphomeyaml {
|
|
ip_hash;
|
|
server unix:/var/run/esphomeyaml.sock;
|
|
}
|
|
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
|
|
server {
|
|
server_name hassio.local;
|
|
listen %%port%% default_server;
|
|
root /dev/null;
|
|
|
|
location / {
|
|
proxy_redirect off;
|
|
proxy_pass http://esphomeyaml;
|
|
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
proxy_set_header Authorization "";
|
|
|
|
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 $http_host;
|
|
proxy_set_header X-NginX-Proxy true;
|
|
}
|
|
}
|
|
}
|