I have a Nginx server that seats in front of ERPNext server on my private network.
I want a request from internet to my Nginx server will be passed to ERPNext server.
I ran bench setup nginx and but it seems the generated configurations are only use for a Nginx server that install on the same server with ERPNext.
An example:
I don’t want install another Nginx server on my ERPNext server.
How can I have production Nginx configuration for a Nginx server that seats in front of ERPNext server and proxy to that ERPNext server?
Thank you.
if I understand you correctly, you want the first nginx (not the one on the ERPNext server) to act like a reverse proxy.
If you want to achieve this with an apache2 server, you need a2enmod proxy (and depending on the configuration related modules). Then, in the virtual host config, you will need something like
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / https://[erpnext_ip]/
ProxyPassReverse / https://[erpnext_ip]/
ProxyPreserveHost On
ProxyAddHeaders Off
Thank you @lasalesi.
You understand me. I want my Nginx server acts as a reverse proxy.
But I don’t want to have another Nginx server on my ERPNext server and can use the generated configuration from command bench setup nginx. I know how to config proxy_pass.
How can I achieve that with only my first Nginx server?
@Tech_Hack_IT How do we configure nginx already in use in hosted Erpnext to enable Metabase to be hosted in the same server.The Nginx for metabase is in proxy. Once I follow the instruction on the configuration of the proxy nginx, Erpnext will no longer open. Help out on how to ensure the nginx serves both the Erpnext and Metabase with ssl in a hosted environment.Thanks
We have followed the above .It does not work.We actually installed the metabase and we can see the metabase dashboard on the Erpnext board.But we cannot access the metabase.
After the installation.The metabase came up when we accessed with the url:3000 for the first time for us to supply the needed database name and password,etc but never accessible with the url:3000 after that. Although the metabase dashboard is still shown in the Erpnext dashboard but there is no communication with the metabase.We followed the instruction strictly as provided in the link.However what we concluded is that the write up is for local installation of metabase in erpnext deployed locally and not one deployed on the vps.However we may be wrong but need a bit guidance from you.Thanks
You create the dashboard in metabase then click the sharing and embedding option you see the code there (Default its shows in javascript file you can change into Python code).
Then create the custom app in the name of metabase.
You can copy the entire python code from sharing and embedding option.Then paste the entire code in the custom app py file.
Then you can see the metabase data inside the erpnext by using metabase dashboard menu.