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:
unoconv 0.8.2
Written by Dag Wieers <dag@wieers.com>
Homepage at http://dag.wieers.com/home-made/unoconv/
platform posix/linux2
python 2.7.5 (default, Aug 7 2019, 00:51:29)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
LibreOffice 5.3.6.1
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:
soffice --version
That's 2 dashes before version.
Should reply with this:
[root@sos ~]# /usr/bin/soffice --version
LibreOffice 5.3.6.1 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?
whereis gs
use path you see in above command ouput to see version.
/usr/bin/gs --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.
'SoS', Ken