Git Product home page Git Product logo

Comments (2)

uaktags avatar uaktags commented on August 21, 2024

Use nginx in front of it instead as a reverse proxy. I never setup an explorer to use nginx ports (or anything outside of the typical 80/443). Then point your A record to the nginx webserver. Let that proxy_pass from 443 to whatever port the explorer is running on. Add the SSL to the nginx config.

So, you have a semi-decent server. Have it run 2 explorers with ports 3001 (coin1.com) and 3002 (coin2.com).
On this server install nginx.
Add a virtual host (server) config for each website. It'll look something like this:

server {
  listen 443;
  server_name coin1.com;
  location / {
        proxy_pass https://127.0.0.1:3001;
        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;
  }
  ssl on;
  ssl_certificate /path/to/coin1.com.pem;
  ssl_certificate_key /path/to/coin1.com.key;
}
server {
  listen 80;
  server_name coin1.com;
  location / {
        proxy_pass http://127.0.0.1:3001;
        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;
  }
}

Now going to http or https coin1.com should point you to one of the explorers. Create the site configs for the other coin and you should be in business with a nginx restart.

Note I'm kinda winging that above with the configs, just pulled the proxy stuff out of my snippets I have, but looking at it it should be good. The logic looks workable. Just test in a vm and then check error log for any issue.

from explorer.

spy0012 avatar spy0012 commented on August 21, 2024

thanks, will check it out, might just separate them a lot easier and probably long term more stable

from explorer.

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.