Skip to content

Possible to use Traefik (reverse proxy) with Pi.Alert? #449

Answered by cvc90
Isegrimm asked this question in Q&A
Discussion options

You must be logged in to vote

Hi!

I think a possible solution to this problem could be solved as follows.

In the file /etc/nginx/sites-available/default of Docker Pi.Alert would add the directive that you mention that Traefik could read them.

add_header X-Forwarded-Prefix "/pialert" always;
proxy_set_header X-Forwarded-Prefix "/pialert";

server {
    listen 80 default_server;
    root /var/www/html;
    index index.php;
    #rewrite /pialert/(.*) / permanent;
    add_header X-Forwarded-Prefix "/pialert" always;
    proxy_set_header X-Forwarded-Prefix "/pialert";

  location ~* \.php$ {
    fastcgi_pass unix:/run/php/php7.4-fpm.sock;
    include         fastcgi_params;
    fastcgi_param   SCRIPT_FILENAME    $document_r…

Replies: 2 comments 12 replies

Comment options

You must be logged in to vote
12 replies
@jokob-sk
Comment options

@Isegrimm
Comment options

@jokob-sk
Comment options

@cvc90
Comment options

Answer selected by Isegrimm
@cvc90
Comment options

@Isegrimm
Comment options

@Isegrimm
Comment options

@jokob-sk
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants