Sub_filter help
January 17, 2022 08:12AM

I'm having trouble using the sub_filter option with NginX running on Ubuntu.

It's serving an internal filemaker server externally, at $externalURL, but one of the folders uses an internal path to the server.
This ends up in an error saying you can't reach internalURL, check for typos.

I want to substitute https://internalURL for https://$externalURL.

My output from nginx -V includes "--with-http_sub_module" so I thought it would be good to go but I still end the error page .

I've tried different sub_filter_types: none (default text?), html & css text & java, and all (*). Still fails.

In my server block I have this:

location / {

sub_filter 'https://internalURL/' 'https://$externalURL/';
sub_filter_once off;
# sub_filter_types text/html text/css text/javascript;
sub_filter_types *;
### End of SUB_FILTER Test

Is that correct and complete? Is there something else I should check or configure?

Many thanks in advance - and apologies for lack of formatting!
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 105
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready