nextcloud_ynh icon indicating copy to clipboard operation
nextcloud_ynh copied to clipboard

Nginx fails to start at server boot because of the nextcloud nginx config

Open OniriCorpe opened this issue 4 months ago • 1 comments

Describe the bug

nginx crashes at server boot

nginx -t and the systemctl log return this error : nginx: [warn] duplicate extension "js", content type: "text/javascript", previous content type: "application/javascript" in /etc/nginx/conf.d/nuage.emelyne.eu.d/nextcloud.conf:7

when i comment the following lines in my /etc/nginx/conf.d/nextcloud.example.com.d/nextcloud.conf, nginx start without any issue:

# include mime.types;
# types {
#    text/javascript js mjs;
# }

i don't know why these lines are here, so i don't patch the package and i open this issue

Context

  • Hardware: VM / Proxmox / HPE Microserver Gen 10 (mk 1)
  • YunoHost version:
yunohost:
  repo: stable
  version: 11.2.10.1
yunohost-admin:
  repo: stable
  version: 11.2.4.1
moulinette:
  repo: stable
  version: 11.2
ssowat:
  repo: stable
  version: 11.2
  • I have access to my server: Through SSH | through the webadmin | direct access via keyboard / screen
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: no
  • Using, package version/branch: 28.0.2~ynh1 main

Steps to reproduce

  1. have installed nextcloud
  2. maybe some fuckery somewhere???
  3. reboot the server
  4. nginx fails to start

Expected behavior

nginx starts successfully as usual

Logs

systemd[1]: Starting A high performance web server and a reverse proxy server...
nginx[2931]: nginx: [warn] duplicate extension "js", content type: "text/javascript", previous content type: "application/javascript" in /etc/nginx/conf.d/nuage.emelyne.eu.d/nextcloud.conf:7
systemd[1]: nginx.service: start-pre operation timed out. Terminating.
systemd[1]: nginx.service: Control process exited, code=killed, status=15/TERM
systemd[1]: nginx.service: Failed with result 'timeout'.
systemd[1]: Failed to start A high performance web server and a reverse proxy server.

OniriCorpe avatar Feb 22 '24 19:02 OniriCorpe