mondediefr / docker-flarum

:speech_balloon: :whale: Docker image of Flarum
https://hub.docker.com/r/mondedie/flarum
MIT License
507 stars 131 forks source link

A question about custom Nginx configuration #84

Closed xxxxxliil closed 3 years ago

xxxxxliil commented 3 years ago

I checked https://github.com/mondediefr/docker-flarum/blob/fc0944c7d5bcdec0d4387d097a6eb341563e3ca8/rootfs/etc/nginx/nginx.conf#L60 and https://github.com/mondediefr/docker-flarum/blob/fc0944c7d5bcdec0d4387d097a6eb341563e3ca8/rootfs/usr/local/bin/startup#L68-L75, and if nginx.conf#L60 is replaced with the following configuration file fragment, can remove startup#L68-L75.

    #Don't assume /etc/nginx/flarum/custom-vhost-flarum.conf always exists
    #/etc/nginx/flarum/custom-vhost-flarum.conf is file
    if (-f /etc/nginx/flarum/custom-vhost-flarum.conf){
        include /etc/nginx/flarum/custom-vhost-flarum.conf;
    }
ozonep commented 3 years ago

@xxxxxliil Probably you meant lines 68-75? In startup script.

xxxxxliil commented 3 years ago

@xxxxxliil Probably you meant lines 68-75? In startup script.

Yes, lines 68-75

xxxxxliil commented 3 years ago

@Magicalex

al3xLvs commented 3 years ago

Yes I am agree with this solution if (-f /etc/nginx/flarum/custom-vhost-flarum.conf)