hosting multichain-explorer-2 using apache

+3 votes
The server i used to install the explorer already has apache running on port 80, and the server block most ports (it's in the cloud and i don't have access to the cloud) so i can't use other ports to host the explorer.
asked Dec 6, 2021 by mikhatanu

2 Answers

0 votes
In this case it sounds like you should run MultiChain Explorer on another port, which won't be visible from the outside but can still be accessed from other processes on the server itself. Then set up a proxy in Apache which passes all requests to a certain subdomain through to your Explorer, which will be visible on 127.0.0.1 and this other port. Here's an idea of how an Apache subdomain proxy can be configured:

https://serverfault.com/questions/337442/apache-proxypass-only-if-from-a-subdomain/337477
answered Dec 6, 2021 by MultiChain
I got a problem with it as i cannot use the root path of the ip (i need to set it to http://x.x.x.x/explorer), the css etc cannot be found as the explorer uses absolute path rather than relative path
Thanks for your note. This is something we will try to fix shortly but in the meantime you can hopefully see where to change it in the code yourself.
BTW, an appropriate HTML <base> tag inserted into the <head> of each page should be enough to fix this.
0 votes

Just another update on this. If you download the latest Explorer 2, you can add a base= tag inside the .ini file to set the base URL for all relative URLs. There's an explanation of this in example.ini. In your case (based on your comment below) you would use base=/explorer/

answered Dec 14, 2021 by MultiChain
...