I have a default.conf file that shows:
server {
listen 80;
server_name localhost;
rewrite ^/(.*)$ https://objectstorage.ca-city.oraclecloud.com/n/randomhash/b/bucketname/o/$1 permanent;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
When i hit my browser with http://ip_address/file.txt, it will redirect me to https://objectstorage.ca-city.oraclecloud.com/n/randomhash/b/bucketname/o/file.txt and download the file
When i try to use curl: curl -X GET http://ip_address/testfile.txt, i get this:
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.18.0</center>
</body>
</html>
Thanks in advance