Giter Site home page Giter Site logo

Comments (3)

lucasvmx avatar lucasvmx commented on June 25, 2024
  • Set oxidized to listen only in 127.0.0.1:8888 and make nginx to redirect requests to this port.
  • Redirect host port 81 to container port 888

Do something like this on /etc/nginx/nginx.conf:

	server {
		listen 80;
		server_name host.com;

		location / {
			auth_basic "restrict";
			auth_basic_user_file /etc/apache2/.htpasswd; 
			proxy_pass http://127.0.0.1:81;
			proxy_set_header Host $host;
			proxy_set_header X-Real-IP $remote_addr;
			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
			proxy_set_header X-Forwarded-Proto $scheme;
		}
	}

use apache htpasswd and save password to /etc/apache2/.htpasswd

from oxidized.

getienne53 avatar getienne53 commented on June 25, 2024

Thanks Lucas

I understand your approach which consists of using a reverse proxy like NGinx, HaProxy or Traefik on the front of Puma server.

I'm waiting to see if anyone knows how to integrate an access-list or password directly into Puma.

If it's not the case, I will follow the process you suggest.

Have a good day :-)

from oxidized.

getienne53 avatar getienne53 commented on June 25, 2024

No more information about Puma config...

So I followed Lucas's recommendation with Nginx, and it works well.

In detail, on a Debian 11 distribution, that give :

In the .config/oxidized/config file:
rest:127.0.0.1:8888
apt install nginx apache2-utils
added the following paragraph in /etc/nginx.nginx.conf:

server {
listen 80;
server_name ct-oxid.xxx;

            location / {
                    auth_basic "restrict";
                    auth_basic_user_file /etc/apache2/.htpasswd;
                    proxy_pass http://127.0.0.1:8888;
                    proxy_set_header Host $host;
                    proxy_set_header X-Real-IP $remote_addr;
                    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                    proxy_set_header X-Forwarded-Proto $scheme;
            }
    }

htpasswd -c /etc/apache2/.htpasswd user

Bye

from oxidized.

Related Issues (20)

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.