[GH-ISSUE #97] Reverse proxy issues #68

Closed
opened 2026-03-03 16:04:10 +03:00 by kerem · 4 comments
Owner

Originally created by @amirabiri-odoro on GitHub (Jul 4, 2017).
Original GitHub issue: https://github.com/mthenw/frontail/issues/97

I could not figure out how to run frontail behind an nginx reverse proxy.

I've tried the following nginx configuration:

location /logs/ {
    proxy_pass http://frontail/;
    sub_filter_once off;
    sub_filter_types text/html;
    sub_filter 'href="/' 'href="/logs/';
    sub_filter 'src="/' 'src="/logs/';
    sub_filter "io.connect('/'" "io.connect('/logs/'";
    access_log /var/log/nginx/access.log trace;
}

The assets worked, but the socket.io still tries to connect to /?E...

Is it possible to add some cmd line switch to tell frontail which url path to use?

Or even better - use relative paths for assets / socket?

Originally created by @amirabiri-odoro on GitHub (Jul 4, 2017). Original GitHub issue: https://github.com/mthenw/frontail/issues/97 I could not figure out how to run frontail behind an nginx reverse proxy. I've tried the following nginx configuration: location /logs/ { proxy_pass http://frontail/; sub_filter_once off; sub_filter_types text/html; sub_filter 'href="/' 'href="/logs/'; sub_filter 'src="/' 'src="/logs/'; sub_filter "io.connect('/'" "io.connect('/logs/'"; access_log /var/log/nginx/access.log trace; } The assets worked, but the socket.io still tries to connect to `/?E...` Is it possible to add some cmd line switch to tell frontail which url path to use? Or even better - use relative paths for assets / socket?
kerem closed this issue 2026-03-03 16:04:10 +03:00
Author
Owner

@scottbasgaard commented on GitHub (Dec 22, 2017):

Any updates on this @amirabiri-odoro? Would love to have the same setup.

<!-- gh-comment-id:353586916 --> @scottbasgaard commented on GitHub (Dec 22, 2017): Any updates on this @amirabiri-odoro? Would love to have the same setup.
Author
Owner

@amirabiri-odoro commented on GitHub (Dec 25, 2017):

I resorted to running on root path on a different port.

<!-- gh-comment-id:353843258 --> @amirabiri-odoro commented on GitHub (Dec 25, 2017): I resorted to running on root path on a different port.
Author
Owner

@carschrotter commented on GitHub (Jun 17, 2019):

Any updates on this @amirabiri-odoro? Would love to have the same setup.
replace
sub_filter "io.connect('/'" "io.connect('/logs/'"; with
sub_filter "path: '/socket.io'" "path: '/logs/socket.io'";
works fine

<!-- gh-comment-id:502710172 --> @carschrotter commented on GitHub (Jun 17, 2019): > > > Any updates on this @amirabiri-odoro? Would love to have the same setup. replace `sub_filter "io.connect('/'" "io.connect('/logs/'";` with `sub_filter "path: '/socket.io'" "path: '/logs/socket.io'";` works fine
Author
Owner

@scottbasgaard commented on GitHub (Jun 19, 2019):

thanks @carschrotter, will give it a go!

<!-- gh-comment-id:503479094 --> @scottbasgaard commented on GitHub (Jun 19, 2019): thanks @carschrotter, will give it a go!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/frontail#68
No description provided.