Hello for all…
I applied SSL certificate to my ERPNext site, and I can access it externally using HTTPS. However, when I try to access it from within the VM, I can only use HTTP. How can I change this to make it accessible via HTTPS from inside the VM as well…?
Hello,
What do mean by “accessible inside the VM” ? What kind of VM ? Proxmox, VMWare,… ? How and where do you install it ? Do you use the same URL, inside the VM browser and the one you use from external access ?
It’s not really related to ERPNext, it’s more de network/browser setup question on virtual environnement and web server configuration. But with more information, it should be possible to find something over the internet to solve your problem
Hello @FHenry The ERPNext system is installed on Ubuntu within a Proxmox server. Yes, I am using the same URL in the browser inside the virtual machine.
Hey
What is the error message exactly, is there a specific error message you encounter in the browser?
Do the commands dig your-domain-name
, curl -L your-domain-name
show the same result inside and outside the VM? Does curl localhost
work inside the VM, or redirects?
@corentin No, there is no error message. When I enter my site URL with HTTPS in the browser inside my Ubuntu VM, it just keeps loading without any result. However, when I access it from any other browser outside the VM, it works fine. Inside the VM, it only works if I use HTTP instead of HTTPS. When I ping my site URL from outside, I can see my public IP
Hmm okay, what does curl -i http://your-site.example.com
show when run inside the VM?
For my own site I get:
corentin:~$ curl -i http://your-site.example.com
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Mon, 04 Nov 2024 16:34:06 GMT
Content-Type: text/html
Content-Length: 162
Connection: keep-alive
Location: https://your-site.example.com/
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>
What about dig +short your-site.example.com
from inside the VM? Both for IPv4 and IPv6.
They should match the results of running curl outside the VM.
Looks like you have an Apache server running, weird? Maybe this is not actually your server that is found by curl
form inside the VM. Possibly because the DNS records are not up to date? Maybe I’m overthinking
Yes they both match the result of running curl outside of my VM