hosting a website on a virtual machine, or other alternatives
i want to know how to host a website on a private VM
or if there are some good other alternatives
or if there are some good other alternatives
19 Replies
i've tried it with apache, since ive used it somewhat before. but then ran into some authorization problems with transferring the files.
But i then also don't know how to host it publically and not just on my own network. but on the network would be a good start
I typically wouldn't recommend hosting a public website locally, for many reasons.
Get a cheap VPS and check out CapRover or similar docker/proxy/cert set up
ok, but before i want to host something more official. can't i just host it to where-ever on my own network with a VM?
Why though?
Like why a vm? Also what kinda env are you needing. You mentioned Apache? This php?
In the US and other places hosting from your ISP is against their TOS, you probably don't have a static IP so it's not like you can point DNS to it.
Hosting your own vm is going to go into so many unrelated fields. Operating system install and management, networking both real and virtual, routing, port forwarding, firewalls, software installs and updates and configuration
Yea that to 😶
You're not going to find an
npm run vm
for this, it's a dozen different topics that are each as broad and deep and full of pitfalls as frontend and backend development
You'll have to split it up into chunks, the tackle each of those separately just like writing software, because your current question isn't even something you can really answer with a single tutorial link or somethingknowledge, i thought of a vm and with apache since ive used them before, aka some basics of that with ubuntu terminal. i don't use php no. so by doing it manually on my own, it's jsut too complicated
Your best bet is starting with Wsl on your pc, installing apache there and getting that working. That is probably the easiest step out of many more, and detailing those steps goes way beyond the scope of what people can reasonably do in a discord forum post
Check out PodMan
not that it narrows the thing down, but my VM has a static ip, since i have set my dhcp to give out a certain range of which is in it's range or not
But the ip to the outside world is your dchp from your ISP
yes, but now i'm trying to know how to test host it on my own local network. not publically. since i now know that it's too complicated
.
ok, thanks
Also you could look up how to make a local intranet ?
But that's again more sys admin stuff
yeah but that's also interesting and fun.
i will
I'd say something something Docker > VM but not my world
again that Podman looks interesting, and I've heard good things.
gl!
i've heard about docker and tried to find some good info that explained it but never got it
so i set up podman, but i haven't figured out how to access it through anywhere from my local network. so right now it's basically as useful as the live server extension in vs code