Coder Social home page Coder Social logo

nginxtos3's Introduction

Create a Static Page on S3 AWS behind Nginx As reverse proxy

This configuration is very simple, I will show you as configure a static page on AWS S3 Bucket

Create a bucket S3 on AWS

Very images below:

Image01 Image01

Image02 Image02

Image03 Image03

Image04 Image04

Image05 Image05

Image06 Image06

Image07 Image07

Configure your Nginx

One simple configuration with Nginx via Docker container

docker build -t renizgo/nginx-to-s3 .

Run docker image generated above

docker run -d -p 80:80 renizgo/nginx-to-s3

Configure your /ect/hosts, insert line below:

127.0.0.1  renatomarigo.com.br

Just configuration set

    server_name renatomarigo.com.br;

    #charset koi8-r;
    #access_log  /var/log/nginx/host.access.log  main;

    location / {
        proxy_set_header Host 'nginxtos3.s3-website-sa-east-1.amazonaws.com';
        proxy_set_header Authorization '';
        proxy_hide_header x-amz-id-2;
        proxy_hide_header x-amz-request-id;
        proxy_hide_header Set-Cookie;
        proxy_ignore_headers "Set-Cookie";
        proxy_intercept_errors on;
        proxy_pass http://nginxtos3.s3-website-sa-east-1.amazonaws.com/; # Edit your Amazon S3 Bucket name
        expires 1y;
        log_not_found off;
    }

Access your site

http://renatomarigo.com.br

Image08 Image08

nginxtos3's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.