Resolving "405 Method Not Allowed"

I am try to install Tryton version 6 on a newly installed Debian 11 Bullseye. I am doing the build for the LAN only, so I am not installing a LetsEncrypt certificate.

I created a slightly modified script from the instructions on the Tryton Debian Apt Repository page. Here is the script I am using to install Tryton.

#!/bin/bash

sudo apt install -y curl

sudo curl -o /etc/apt/trusted.gpg.d/debian.tryton.org-archive.gpg http://debian.m9s.biz/debian/debian.tryton.org-archive.gpg

## For Debian Bullseye using Tryton 6.0
debianversion=bullseye
trytonversion=6.0
echo "deb https://debian.m9s.biz/debian/ $debianversion-$trytonversion main" | sudo tee -a /etc/apt/sources.list

file="tryton-$debianversion-$trytonversion.list" 
sudo curl -o /etc/apt/sources.list.d/$file http://debian.m9s.biz/debian/$file

sudo curl -o /etc/apt/preferences.d/debian.tryton.org.pref http://debian.m9s.biz/debian/debian.tryton.org.pref

sudo apt update

sudo apt upgrade -y

sudo apt dist-upgrade -y

sudo apt install -y tryton-server-all-in-one -t $debianversion-$trytonversion

exit

After running the script, I get the following 405 response when I try to open the site in a browser…

Method Not Allowed

The method is not allowed for the requested URL.

When I started trying to figure out why the web page would not load, I have noticed two things…

1. Nginx Configuration

The Nginx configuration in /etc/nginx/sites-enabled points to a root of root /var/www/erp/public; (erp is the hostname). There is no erp directory in /var/www.

sysadmin@erp:~$ ls -l /var/www
total 4
drwxr-xr-x 2 root root 4096 Sep 15 12:01 html

2. Tryton Configuration

The /etc/tryton/trytond.conf points to root = /usr/share/tryton-sao/www. Again there is not a tryton-sao directory in /usr/share.

sysadmin@erp:~$ ls -l /usr/share | grep tryton
drwxr-xr-x    3 root root  4096 Sep 15 14:21 tryton-server
drwxr-xr-x    3 root root  4096 Sep 15 14:22 tryton-server-all-in-one
drwxr-xr-x    3 root root  4096 Sep 15 14:22 tryton-server-postgresql

What needs to be installed in those missing directories? Or am I missing something else?

I do not use Debian.
But it looks like you do not have sao (the web client) installed. It is not mandatory if you are going to use the desktop client but it is needed to access Tryton from a browser.

tryton-sao (the webclient) is currently not available via Debian package, it is in the pipeline nevertheless. For now please use tryton-client with the connection parameters provided in the README.

[debian11] $ apt-cache show tryton-sao
Package: tryton-sao
Version: 6.0.44+ds1-1~11bullseye+1
Architecture: all
Maintainer: Debian Tryton Maintainers <team+tryton-team@tracker.debian.org>
Installed-Size: 13279
Depends: tryton-server (>= 6.0)
Homepage: https://www.tryton.org/
Priority: optional
Section: web
Filename: pool/main/t/tryton-sao/tryton-sao_6.0.44+ds1-1~11bullseye+1_all.deb
Size: 1616028
SHA256: 0da034bc63e58d7ca4371e95b9f76a558f43e646b207d7e8f749e03d4694a52f
SHA1: 5243958ade22914459a73bcf30d745248611bdce
MD5sum: 00daa85aa29cb195ab00a7d5bb66f139
Description: Tryton application platform - web client
 Tryton is a high-level general purpose application platform. It is the base
 of a complete business solution as well as a comprehensive health and hospital
 information system (GNUHealth).
 .
 This package provides the web client running on top of the server.
Description-md5: e21bcc92cad3abd9f738228c831b1885

And debian.m9s.biz repository also provides tryton-sao 7.0.18+ds1-4~11bullseye+1
And same are available for Debian 12 (Stable)