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
19 Replies
Kashimoto
KashimotoOP•2y ago
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
b1mind
b1mind•2y ago
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
Kashimoto
KashimotoOP•2y ago
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?
b1mind
b1mind•2y ago
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.
Jochem
Jochem•2y ago
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
b1mind
b1mind•2y ago
Yea that to 😶
Jochem
Jochem•2y ago
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 something
Kashimoto
KashimotoOP•2y ago
knowledge, 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
Jochem
Jochem•2y ago
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
b1mind
b1mind•2y ago
Check out PodMan
Kashimoto
KashimotoOP•2y ago
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
b1mind
b1mind•2y ago
But the ip to the outside world is your dchp from your ISP
Kashimoto
KashimotoOP•2y ago
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 .
b1mind
b1mind•2y ago
If you just want stuff locally check out https://podman.io/ I heard it's nice docker env locally
Kashimoto
KashimotoOP•2y ago
ok, thanks
b1mind
b1mind•2y ago
Also you could look up how to make a local intranet ? But that's again more sys admin stuff
Kashimoto
KashimotoOP•2y ago
yeah but that's also interesting and fun. i will
b1mind
b1mind•2y ago
I'd say something something Docker > VM but not my world again that Podman looks interesting, and I've heard good things. gl!
Kashimoto
KashimotoOP•2y ago
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
Want results from more Discord servers?
Add your server