robots.txt and sitemap.xml site.webmanifest

Hello, I am able to load the robots.txt and sitemap.xml site.webmanifest files in the form https://example.com/robots.txt, for example, the root directory of magento being defined under / pub via nginx. conf.sample (from Magento 2 installation). I can load files from http://example.com/pub/robots.txt but that's not what I want. I want to be able to upload files like https://example.com/robots.txt https://example.com/sitemap.xml etc. You know how to solve this problem?