unoconv is a python script and if you did put it in /usr/bin/ it would be accessible to this test by any user that has ssh login to server (ie, root).
As root user, type: unoconv -V and press ENTER.
Should see this:
Written by Dag Wieers <firstname.lastname@example.org>
Homepage at http://dag.wieers.com/home-made/unoconv/
python 2.7.5 (default, Aug 7 2019, 00:51:29)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
Unoconv uses LibreOffice converter in a headless mode. It's LibreOffice that actually converts the docx you've mentioned to a pdf.
So is LibreOffice installed on server? The app is really 'soffice' so what does your server say for this command:
That's 2 dashes before version.
Should reply with this:
[root@sos ~]# /usr/bin/soffice --version
LibreOffice 126.96.36.199 30(Build:1)
Is the listening service for unoconv listening?
Try this command to see:
[root@sos ~]# /bin/systemctl status unoconv.service
Should respond showing it's active and listening for request.
And lastly, ghostscript is involved ... is ghostscript installed?
use path you see in above command ouput to see version.
In the moodle config, are the paths to ghostscript/unoconv other CentOS cli utilities/programs set in Moodle?
To be honest ... using unoconv is more difficult to set up and the listener can be problematic.
Might be easiest to use the Google Document Conversions option.