Server Fault Asked by AnotherClueless on December 8, 2020
NGINX location config:
location /geminabox/ {
client_body_buffer_size 128K;
client_max_body_size 16M;
rewrite ^/geminabox/(.*) /$1 break;
proxy_set_header Host $http_host/geminabox/;
proxy_pass http://127.0.0.1:8205/;
}
I’m trying to run GemInABox behind nginx. The service itself works fine, however on the web display it doesn’t pass static files properly, showing blank html.
From the console, the mistake seems to be that instead of calling example.com/geminabox/master.css, it calls example.com/master.css.
Yet it shows properly if i call 127.0.0.1:8205 in my web browser.
NGINX’s error log:
[error] 5813#0: *272 open() "/usr/share/nginx/html/master.js" failed (2: No such file or directory), client: 123.123.123.10, server: 123.123.123.12, request: "GET /master.js HTTP/1.1", host: "123.123.123.12", referrer: "http://123.123.123.12/geminabox/"
(ips changed)
I’ve looked into some suggestions adding a trailing slash or adding more header options, but none of those worked so far. So i hope it’s something small and obvious that I’m just overlooking.
As requested my whole nginx block
user nobody;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;
events {
worker_connections 1024;
}
http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 4096;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;
server {
listen 80;
listen [::]:80;
server_name 137.226.172.42;
root /usr/share/nginx/html;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
}
My location file sits in /default.d/
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP