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.