Claude super rough first cut of a few packages. Almost certainly entirely unusable...
This commit is contained in:
47
CloudronPackages/ConsulDemocracy/nginx.conf
Normal file
47
CloudronPackages/ConsulDemocracy/nginx.conf
Normal file
@@ -0,0 +1,47 @@
|
||||
server {
|
||||
listen 8000;
|
||||
server_name _;
|
||||
|
||||
root /app/code/public;
|
||||
client_max_body_size 100M;
|
||||
|
||||
# Handle asset requests
|
||||
location ~ ^/(assets|packs)/ {
|
||||
expires max;
|
||||
add_header Cache-Control public;
|
||||
}
|
||||
|
||||
# Proxy requests to the Rails application
|
||||
location / {
|
||||
try_files $uri @passenger;
|
||||
}
|
||||
|
||||
location @passenger {
|
||||
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-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Server $host;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
|
||||
# Forward the original request scheme (http or https)
|
||||
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
|
||||
|
||||
# Needed for Cloudron authentication
|
||||
proxy_set_header X-Cloudron-Proxy-Port 8000;
|
||||
|
||||
# Proxy to the Rails application served by Puma
|
||||
proxy_pass http://unix:/run/consuldemocracy.sock;
|
||||
proxy_redirect off;
|
||||
}
|
||||
|
||||
# Error pages
|
||||
error_page 500 502 503 504 /500.html;
|
||||
error_page 404 /404.html;
|
||||
error_page 422 /422.html;
|
||||
|
||||
# Logging
|
||||
access_log /dev/stdout;
|
||||
error_log /dev/stderr;
|
||||
}
|
Reference in New Issue
Block a user