Why do I always show blocked when I use Google storage to configure the website Forbidden

Show More
Show More

server {
listen 80;
listen [::]:80;
server_name rgpslocation.org;

location / {
proxy_pass https://storage.googleapis.com/gpslocation/;
proxy_set_header Host $host;
autoindex off;
}

location /script.js {
proxy_pass https://storage.googleapis.com/gpslocation/script.js;
proxy_set_header Host $host;
autoindex off;
}

location /styles.css {
proxy_pass https://storage.googleapis.com/gpslocation/styles.css;
proxy_set_header Host $host;
autoindex off;
}

location ~* \.(?:html|htm|css|js)$ {
try_files $uri $uri/ =404;
access_log off;
log_not_found off;
open_file_cache off;
default_type text/plain;
satisfy any;
allow all;
include fastcgi_params;
}
}


# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
#
# Read up on ssl_ciphers to ensure a secure configuration.
# See: https://bugs.debian.org/765782

the web always show 

Forbidden

You don't have permission to access / on this server.

this the nginx/sites-enabled/default file.  And I have already opened the public permissions for Google Storage.

 

1 1 289
1 REPLY 1

Hi @runt4o,

Welcome to Google Cloud Community!

I hope you could give more context. Forbidden error could have something to do with permission issue. Check if the issue is coming from GCS permission. You may want to also check that the object is shared publicly. If it is not, see Making Data Public for instructions on how to do this.

See this troubleshooting documentation for Forbidden errors regarding Google Cloud Storage. 

Hope this helps.

 

Top Labels in this Space