OSDev.org

The Place to Start for Operating System Developers
It is currently Wed Nov 25, 2020 10:13 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: My own server
PostPosted: Sat Aug 15, 2020 3:52 pm 
Offline
Member
Member
User avatar

Joined: Fri Nov 22, 2019 5:46 am
Posts: 432
I want to host my own server for the web, with some generic webpages and some webapp (Gogs) which I might even change a bit.
My current hosting treaty doesn't include that (no own webapps allowed).
Is it overkill (regarding work hours) to run my own server for that?
What is the cheapest technical solution for that?

Greetings
Peter

_________________
https://wiki.osdev.org/User:PeterX


Top
 Profile  
 
 Post subject: Re: My own server
PostPosted: Sat Aug 15, 2020 4:58 pm 
Offline
Member
Member
User avatar

Joined: Tue Feb 18, 2020 3:29 pm
Posts: 432
It would be a huge job to do that. I have set up home web severs my self, and it was a pain. Note that my experience is in Windows SBS 2011, but setting up an IIS web server involved
Setting a static IP address
Configuring a directory to put my files in, setting permissions, and other things of the like
Creating a new web page through IIS
Configuring port routing in my router's control panel
And then watching it take several minutes to load up a web page. This excludes finding a DNS routing service online to make a domain name. I imagine Linux plus Apache plus MySQL would be a lot harder. I recommend searching for a free web server that will do that. There out their! In fact, there is one at http://www.heliohost.org

_________________
Working on NexBoot, a simple and lightweight GRUB replacement. and NexKe, a stable and fast microkernel. Part of the Nexware Project.


Top
 Profile  
 
 Post subject: Re: My own server
PostPosted: Sat Aug 15, 2020 6:21 pm 
Online
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 2480
nexos wrote:
I imagine Linux plus Apache plus MySQL would be a lot harder.

I set one up a while ago and it was pretty easy, although to be fair I didn't change much from the default configuration. I didn't even set up a static IP, since my router's port forwarding worked with host names. I think the hardest part was setting up SMB to let me drop files directly into /var/www from Windows.


Top
 Profile  
 
 Post subject: Re: My own server
PostPosted: Sat Aug 15, 2020 6:57 pm 
Offline
Member
Member
User avatar

Joined: Fri Nov 22, 2019 5:46 am
Posts: 432
I once setup a LAMPP locally ( = on my PC, for testing purposes). It was quite easy. I think I don't need IIS.
But I want more than static webpages, so I will use Go (that's neccessary for Gogs) and probably CGI. So the normal hosting providers aren't working for me and I don't know how much extra work will be involved for that:
- I don't know how stable server software (like Apache or NGinx) is.
- And whether attacks are a serious thread for a little homepage.
- And I don't know if hosts, IP numbers, DNS etc. are a big deal. I am half-knowledged about such network/internet stuff.

I even have a book for administering Ubuntu Server from the library at hand.

GReetings
Peter

_________________
https://wiki.osdev.org/User:PeterX


Top
 Profile  
 
 Post subject: Re: My own server
PostPosted: Sat Aug 15, 2020 7:56 pm 
Online
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 2480
PeterX wrote:
- I don't know how stable server software (like Apache or NGinx) is.

Probably more stable than whatever Linux kernel you're using to run it.

PeterX wrote:
- And whether attacks are a serious thread for a little homepage.

There are bots constantly scanning the internet in search of known vulnerabilities and common misconfigurations to exploit. If you forget to update your software or make a mistake configuring it, your server will be compromised.

PeterX wrote:
- And I don't know if hosts, IP numbers, DNS etc. are a big deal. I am half-knowledged about such network/internet stuff.

You'll probably want to set up a dynamic DNS service so you can access your server over the internet without needing to memorize an IP address that will change periodically. The dynamic DNS service will require you to install a utility to keep the IP address up-to-date, but you may find that your router already has such a utility. (I didn't end up using the router for this, since I didn't know about it when I set it up...)

To pass traffic from the internet to your server, you need to set up port forwarding on your router. Depending on your router's capabilities, you may need to configure a static IP address on your server. In my case, the router was able to resolve host names, so I set up the server to use DHCP (which was the default) and told the router to forward HTTP and SSH traffic to its host name.


Top
 Profile  
 
 Post subject: Re: My own server
PostPosted: Sun Aug 16, 2020 7:03 am 
Offline
Member
Member
User avatar

Joined: Thu Oct 13, 2016 4:55 pm
Posts: 1017
PeterX wrote:
Is it overkill (regarding work hours) to run my own server for that?
It requires a bit experience, but that's the only sane solution for custom webapps. Having your own HW is not cheap and requires expertise, but you can also buy a VM in the cloud for a couple of quid.
PeterX wrote:
What is the cheapest technical solution for that?
Get a VM in the cloud with preinstalled Linux. All of the providers (like AWS, Azure, DigitalOcean etc.) provide cheap solutions with preinstalled, bootable Linux images. Once you get maintainer experience then you can install your own Linux, that's the best you can do, however I wouldn't recommend that for a beginner.

The things to be done are:
- buy a VM in the cloud / buy a HW and pay for a hosting provider
- buy a domain name and point it to your VM's IP (this should be cheap, ca. $10-50 per year)
- buy a certificate for your domain name (take a look at Let's Encrypt, that's the cheapest)
- install a very minimal system (or use a preinstalled image)
- install a webserver (apache, nginx etc., usually already part of the preinstalled images)
- install a CGI gateway to connect the webserver with your webapps (for example with nginx and php, use php-fpm; for apache install the appropriate module)
- install your webapps
- security, security, security (install and configure a firewall, keep installed packages up-to-date, remove all components that's not required by your webapp or the system, etc.)

Learning how to install Linux is not difficult. Learning how to install a minimalistic Linux is hard requires deep knowledge on the system (but it is essential to have a performant and secure server). Learning how to configure a webserver and CGI gateway is easy, there are lots of tutorials. The most complicated part is security, you'll need lots and lots of experience with that to get it right.

My advice: forget LAMP, and forget Windows. Use a BSD/Linux and learn how to configure your system. (IIS is a joke from security point of view, just like default LAMP configuration files.)

Cheers,
bzt


Top
 Profile  
 
 Post subject: Re: My own server
PostPosted: Sun Aug 16, 2020 8:51 am 
Offline
Member
Member
User avatar

Joined: Fri Nov 22, 2019 5:46 am
Posts: 432
After considering it thoroughly, I have come to the conclusion, that it would be too much distraction and time waste.

I will stick to Gitlab and continue coding my OS.

Thanks to everyone for the help.

Greetings
Peter

_________________
https://wiki.osdev.org/User:PeterX


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group