What are the settings for use online YUI libraries? .... that YUI stuff has to do with themes (css - what makes your theme nice or whonky) and if combo loading, that will try to access the Yahoo Libraries to acquire css (theme) code to render. So IF I cannot see your site can your server 'see' yahoo libraries (inside your private network -> outside ... *but* combo loading *must* pull in from Yahoo libraries files?
Go to: http://YOUIRSERVER/moodle/admin/settings.php?section=ajax
UNCHECK use online YUI libraries. Check for YUI combo loading ... what your Moodle can't acquire from the network it will try to use what it has .... at least that's what I understand of it .... maybe Mary Evans, very active in themes, could verify or assist here.
Also, thanks for the update on OS's .... comment: GenToo Linux is traditionally a good desktop Linux distro but there aren't many who run GenToo as a server platform serving WordPress, Joomla, Drupal, and maybe especially Moodle. Could there be a difference? Uhhhh ... yes, but don't know what.
That's also true of nginx ... compared to the blogs/wikis/docs on apache there is very little on nginx.
Don't run nginx myself .... when setting up https did you have to setup any kind of reverse proxy?
Did find this:
http://nginx.org/en/docs/http/configuring_https_servers.html
which shows to config https you do have to give a server name.
Are you runninng virtual nginx's? See the link above.
All this to say, from what you described, I've not told or suggested anything wrong to you (I don't think).
Check the docs in Moodle ...
https://docs.moodle.org/33/en/Nginx
Here's a GenToo forum posting from way back .... might apply:
https://forums.gentoo.org/viewtopic-t-1037142-start-0.html
At this point .... think I've attempted to 'help' as much as a can!
As with anything open source and related to serving internet, we all choose our poisons ... and then must learn our antedotes!
'spirit of sharing', Ken