Skip to main content
  1. Posts/

Deploy Static Website with Nginx and MinIO

·1 min·
minio minio nginx
Table of Contents

Setelah install MinIO, pada panduan kali ini akan membahas cara untuk mendeploy static site dengan nginx dan minio. Ini akan mirip seperti mendeploy static site pada AWS cloudfront dengan AWS s3 sebagai penyimpanan object atau file website.

Create bucket
#

Buat bucket dengan nama static

mc mb local/static

Lalu upload file website ke bucket

cd /var/www/site
cp -r ./* local/static

Setting Access Policy ke Public

mc anonymous set public local/static

Install Nginx
#

Install nginx

yum install nginx

Buat dan edit file /etc/nginx/conf.d/static.conf

server {
 listen 80;
 server_name example.com;
 location / {
   rewrite ^/$ /static/index.html break;
   proxy_set_header Host $http_host;
   proxy_pass http://<ip-minio>:9000;
 }
}

Enable dan start nginx

systemctl enable --now nginx

Test akses http://example.com melalui browser Anda.

Related

Install MinIO di Docker
·2 mins
minio docker minio
Setting Reverse Proxy dengan Nginx
·7 mins
nginx linux nginx
Install Traefik di Docker
·3 mins
traefik docker traefik
Benchmark Network Throughput antar Host Linux
·1 min
linux linux
Creating Custom Policy Modules SELinux
·1 min
centos linux centos
Fix Error Panel Admin Webuzo
·5 mins
webuzo webuzo