summarylogtreecommitdiffstats
path: root/nginx-example.conf
diff options
context:
space:
mode:
authorДамјан Георгиевски2018-05-03 16:40:07 +0200
committerДамјан Георгиевски2018-05-03 16:40:10 +0200
commit2d40375c2182cbe7d69f7a3feb692960825d78c5 (patch)
treeba1c355f9017d839625e22ce4d0e20ba4cf6cfa7 /nginx-example.conf
parent606906e07eced008eea3d3bf8b6844e5082f3e6f (diff)
downloadaur-2d40375c2182cbe7d69f7a3feb692960825d78c5.tar.gz
added example nginx configuration, and two sockets
* main app accessed via fastcgi * websockets via http * static files served by nginx
Diffstat (limited to 'nginx-example.conf')
-rw-r--r--nginx-example.conf33
1 files changed, 33 insertions, 0 deletions
diff --git a/nginx-example.conf b/nginx-example.conf
new file mode 100644
index 000000000000..95970eb81062
--- /dev/null
+++ b/nginx-example.conf
@@ -0,0 +1,33 @@
+server {
+ server_name _;
+ listen 443 ssl http2;
+ # ssl_certificate …;
+ # ssl_certificate_key …;
+
+ client_body_buffer_size 10M;
+ client_max_body_size 1024M;
+
+ root /usr/share/virtlyst/static;
+
+ location /static {
+ alias /usr/share/virtlyst/static;
+ access_log off;
+ expires 1d;
+ }
+
+ location /ws {
+ proxy_set_header Host $host:$server_port;
+ 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_connect_timeout 600;
+ proxy_read_timeout 600;
+ proxy_pass http://unix:/run/virtlyst-ws.sock;
+ }
+
+ location / {
+ include fastcgi_params;
+ fastcgi_pass unix:/run/virtlyst.sock;
+ fastcgi_keep_conn on;
+ }
+}