crazy-max / docker-flarum

Flarum Docker image
MIT License
197 stars 32 forks source link

Nginx-Config preventing extension FoF-sitemap from working correctly #83

Closed DrifterOne closed 1 year ago

DrifterOne commented 1 year ago

Support guidelines

I've found a bug and checked that ...

Description

Hi there,

I'm using your container on Unraid and so far it works fine. But when trying to generate a sitemap.xml via the extension FoF-sitemap, it will fail due to a missing nginx config parameter.

Expected behaviour

/sitemap.xml should be public accessible

Actual behaviour

accessing /sitemap.xml will result in an Nginx Error 404

Steps to reproduce

Just run the container, install the FoF-sitemap extension and try to access the URL

Docker info

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  compose: Docker Compose (Docker Inc., v2.17.3)

Server:
 Containers: 14
  Running: 14
  Paused: 0
  Stopped: 0
 Images: 17
 Server Version: 20.10.21
 Storage Driver: btrfs
  Build Version: Btrfs v5.10.1 
  Library Version: 102
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 1c90a442489720eec95342e1789ee8a5e1b9536f
 runc version: v1.1.4-0-g5fd4c4d1
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 5.19.17-Unraid
 Operating System: Slackware 15.0 x86_64 (post 15.0 -current)
 OSType: linux
 Architecture: x86_64
 CPUs: 12
 Total Memory: 62.7GiB
 Name: store1
 ID: DEOO:ROO3:EEH7:N7ZN:KR3P:D3F4:EO75:74ML:X2DN:UPC5:ARBI:CM57
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine

Docker Compose config

No response

Logs

I don't have any.
But here is the necessary config statement, which has to be added to nginx.conf:

location = /sitemap.xml {
                try_files $uri $uri/ /index.php?$query_string;
}

Additional info

An immediate implementation would be wonderful. Thanks