Apache HTTP is an open source web server and a reverse proxy server.
In this recipe we will learn how to set up Apache HTTP with mod_proxy module for connecting to Minio Server. We are goint to set up a new VirtualHost for example.com
Install Minio Server from here. Remember the address and port.
Install Apache HTTP server from here. Usually, mod_proxy module is enabled by default. You can also use your OS repositories (e.g. yum, apt-get).
Create a file under the Apache configuration directory, e.g., /etc/httpd/conf.d/minio-vhost.conf
<VirtualHost *:80>
ServerName example.com
ErrorLog /var/log/httpd/example.com-error.log
CustomLog /var/log/httpd/example.com-access.log combined
ProxyRequests Off
ProxyVia Block
ProxyPreserveHost On
<Proxy *>
Require all granted
</Proxy>
ProxyPass / http://localhost:9000/
ProxyPassReverse / http://localhost:9000/
RemoteIPHeader X-Forwarded-For
</VirtualHost>
Note:
- Replace example.com with your own hostname.
- Replace
http://localhost:9000
with your own server name.
$ minio server /mydatadir
$ sudo service httpd restart