edit-icon download-icon

Configure HTTPS for your own domain name in OSS through reverse proxy

Last Updated: Nov 09, 2018
  • Domain name: oss.a.com

  • Bucket: bu

  • Requirement: Access objects under bu through https://oss.a.com

  1. Configure reverse proxy for oss.a.com on a server.

    For reverse proxy configuration, see the following (The nginx configuration only serves as a reference. Perform the configuration based on your requirements).

    1. server {
    2. listen 443 ; #default_server;
    3. server_name oss.a.com;
    4. location / {
    5. root /alidata/www/ www-a-com/;
    6. //If the host and the bucket are not in the same region, use Internet.
    7. proxy_pass http://aialiyun.oss-cn-hangzhou-internal.aliyuncs.com/;
    8. proxy_set_header Referer http://www.test.com;
    9. }
    10. }
  2. Resolve the records for oss.a.com to the IP address of the server.

  3. Test whether the objects can be accessed successfully. If so, you can add the SSL certificate for this domain name on the server.

If the problem persists, contact after-sales technical support.

Thank you! We've received your feedback.