Recent

Author Topic: Does it require much change to migrate Windows web-server to Linux?  (Read 1385 times)

egsuh

  • Hero Member
  • *****
  • Posts: 1436
I have a Windows web server ---- it does not have any visual components as it is a web server.
It has a datamodule to connect to a Firebird database, and units that do not contain any components.

Can I migrate this to Linux without much effort?  I don't want to pay about $30 per month for Windows Server rental.

And is it easy to maintain Linux server? I do not do much maintenance. But I should be able to access the server from remote place.

Thaddy

  • Hero Member
  • *****
  • Posts: 15487
  • Censorship about opinions does not belong here.
Re: Does it require much change to migrate Windows web-server to Linux?
« Reply #1 on: July 05, 2024, 07:31:18 am »
What server software are you running? I only see some problems if you run IIS.
If you run ngynx or apache and the likes (mainstream) or the server is completely written in Pascal, there usually are no problems at all to migrate to linux.
If you do run IIS there will be a learning curve in administration and configuration.
If you already run one of the mainstream servers -IIS is NOT mainstream - it should be a doddle.
If you choose a  hosting provider make sure of three things:
- the provider allows ssh access and terminal access
- the provider allows let's encrypt certificates ( saves a lot of money )
- fixed ip's ( of course )preferable both IPv4 and IPv6.
Apart from the certificates linux hosters usually have all that and many also allow let's encrypt.
One of my hosting providers does not allow let's encrypt certificates, so I will move my servers to my second provider after the holydays  (after 25 years )

There are many good tutorials about linux server maintenance and configuration on the web and almost all of them are excellent. Installing a linux server locally to play with it is highly recommended, either on a vm or on a device like the raspberry pi.
« Last Edit: July 05, 2024, 08:23:27 am by Thaddy »
My great hero has found the key to the highway. Rest in peace John Mayall.
Playing: "Broken Wings" in your honour. As well as taking out some mouth organs.

egsuh

  • Hero Member
  • *****
  • Posts: 1436
Re: Does it require much change to migrate Windows web-server to Linux?
« Reply #2 on: July 05, 2024, 09:06:08 am »
@Thaddy,

Currently I'm running on IIS, with CGI. I have tested with FCGI.
I compiled the same modules to THTTPServer, and to FCGI for nginx (simply assigning port), both worked fine.

So, there would not be much (almost nothing) to change in my Lazarus programs. But setting up web server (Apache, or nginx) may be difficult on Linux. --> is this what you are saying?

Thaddy

  • Hero Member
  • *****
  • Posts: 15487
  • Censorship about opinions does not belong here.
Re: Does it require much change to migrate Windows web-server to Linux?
« Reply #3 on: July 05, 2024, 09:50:29 am »
It is not difficult, but different. Also most hosting providers give you already installed web servers in a basic, usually correct,  configuration. cgi's is basically just copying to the cgi directory. make sure it is compiled for linux and in the correct bitness, which on most servers is 64 bit. usually the server comes with some software like phpmyadmin and cockpit, which is quite comforable to use and a good starting point, although I prefer a ssh terminal, which i would not recommed in the beginning.
« Last Edit: July 05, 2024, 10:17:40 am by Thaddy »
My great hero has found the key to the highway. Rest in peace John Mayall.
Playing: "Broken Wings" in your honour. As well as taking out some mouth organs.

MarkMLl

  • Hero Member
  • *****
  • Posts: 7419
Re: Does it require much change to migrate Windows web-server to Linux?
« Reply #4 on: July 05, 2024, 11:21:14 am »
It is not difficult, but different. Also most hosting providers give you already installed web servers in a basic, usually correct,  configuration. cgi's is basically just copying to the cgi directory. make sure it is compiled for linux and in the correct bitness, which on most servers is 64 bit. usually the server comes with some software like phpmyadmin and cockpit, which is quite comforable to use and a good starting point, although I prefer a ssh terminal, which i would not recommed in the beginning.

In fact a provider might not allow an arbitrary server to be run unless inside their container/VM system, since their own server might (among other things) be doing clever things with hostname resolution to avoid having to allocate a global IP4 address to each customer. They might also be "reluctant" to allow arbitrary CGIs to run.

All of which appears to point to either hiring physical rack space or a VM. Which might allow continued use of IIS... although as a unix user that obviously wouldn't be my choice.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

egsuh

  • Hero Member
  • *****
  • Posts: 1436
Re: Does it require much change to migrate Windows web-server to Linux?
« Reply #5 on: July 05, 2024, 11:35:44 am »
Quote
All of which appears to point to either hiring physical rack space or a VM. Which might allow continued use of IIS.
I'm thinking hiring a (physically) separate Linux server. It costs about $100 per month. Currently I'm hiring Windows server, which costs additional $30 for Windows Server 2019.

rvk

  • Hero Member
  • *****
  • Posts: 6288
Re: Does it require much change to migrate Windows web-server to Linux?
« Reply #6 on: July 05, 2024, 12:05:27 pm »
Quote
All of which appears to point to either hiring physical rack space or a VM. Which might allow continued use of IIS.
I'm thinking hiring a (physically) separate Linux server. It costs about $100 per month. Currently I'm hiring Windows server, which costs additional $30 for Windows Server 2019.
Wow. Am I wrong or is this very expensive?

For example Linux https://www.strato.nl/server/dedicated-server-linux/
or Windows https://www.strato.nl/server/dedicated-server-windows/

And that isn't even the cheapest one.
There are lots of providers which can provide much cheaper dedicated machines.

Maybe one on OVH https://www.ovhcloud.com/

Or do you have MAJOR HIGH demands for such machine?


Thaddy

  • Hero Member
  • *****
  • Posts: 15487
  • Censorship about opinions does not belong here.
Re: Does it require much change to migrate Windows web-server to Linux?
« Reply #7 on: July 05, 2024, 12:08:09 pm »
That is indeed quite expensive. Do you actually need a physical server? VM's are almost always good enough. BTW check your home IP. I also run some servers from various computers - all my toys - that are exposed to the internet. Officially the IP is dynamic but in practice it never changes. (Vodafone/ziggo)
« Last Edit: July 05, 2024, 12:10:55 pm by Thaddy »
My great hero has found the key to the highway. Rest in peace John Mayall.
Playing: "Broken Wings" in your honour. As well as taking out some mouth organs.

egsuh

  • Hero Member
  • *****
  • Posts: 1436
Re: Does it require much change to migrate Windows web-server to Linux?
« Reply #8 on: July 05, 2024, 12:25:28 pm »
Quote
That is indeed quite expensive.

Hmm.. I checked again. The Linux server only costs about $60 per month now (exchange rate is higher than expected). Currently I'm paying about $107 per month, Server machine + Windows Server + Anti-Virus software.

I may try lower-priced server (like 22 euros / month) abroad.

MarkMLl

  • Hero Member
  • *****
  • Posts: 7419
Re: Does it require much change to migrate Windows web-server to Linux?
« Reply #9 on: July 05, 2024, 12:27:44 pm »
Quote
Guy walks into a club. Bouncer says

"Carrying a gun?"

"No."

"Knife? Nunchuks?"

"No."

"Pepper spray? CS gas?"

"No."

"Well take this broken bottle. It's a jungle in there..."

And /that's/ much what I feel about running my own web server. I've spent a while writing routing software, which among other things had me examining the crap that people were throwing at it in an attempt to break in.

It also had me looking at- among others- Vodafone as a bearer to traffic tunneled through it. And with respect to Thaddy, they use multiple layers of NAT governed by a combination of RFCs and whim, which /cannot/ be relied on. I'd also remind the community of a discussion a few months ago where somebody complained that his database connection went down every time the ISP changed his client address... relying on that being stable is /not/ a good idea.

So the bottom line is that if following that route, a very great deal depends on what firewalls etc. the facility provider implements (and how well they're maintained), and on what control panels etc. are available from various commercial-grade Linux distreaux to make server management bearable.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

duralast

  • New Member
  • *
  • Posts: 17
Re: Does it require much change to migrate Windows web-server to Linux?
« Reply #10 on: July 05, 2024, 03:09:52 pm »
I once had a job as a Web Server admin combined with being the Solaris systems admin for a large online retailer. It lasted a year (2005-2006) and then I bailed. I would never be a Web admin ever again. Maybe it was just that place, but it was brutal. They had no capacity planning and did not know how much traffic they could take and I was there like a month and marketing decided to place a link to their sites (six of them) on the MSN home page for Halloween. That did what marketing wanted. It got traffic. Site went down, then up, then down, then up. The company bought new web and database servers and they had to be setup and installed over three days.

More recently (2014-2021), I ran my own web and mail servers at home and hosted three sites. One of them commercial. I had a static IP which cost $150 per month for their SOHO plan (I'm in the US). I ran Pound as the reverse proxy and nginx as the web server both using FreeBSD. My mail server started on Plan 9, then I moved it to ArcaOS (OS/2), and then finally moved it to OpenBSD using OpenSMTPD. For my firewall I started with OpenBSD and pf, and when they changed the syntax of pf I switched to FreeBSD and ipf.

I had a hardware failure and shut it down in 2021 and moved to a dynamic IP. I haven't ran a web server since. I don't know about using anything hosted, but running your own isn't difficult. The biggest threats were the constant attempts on the mail server and seeing if PHP/WordPress was in use (they were not).

If one was to use WordPress then I would never recommend hosting it yourself and to hire a dedicated WordPress hosting service. They would have the security in place.
« Last Edit: July 05, 2024, 03:18:04 pm by duralast »

Thaddy

  • Hero Member
  • *****
  • Posts: 15487
  • Censorship about opinions does not belong here.
Re: Does it require much change to migrate Windows web-server to Linux?
« Reply #11 on: July 05, 2024, 03:27:01 pm »
which /cannot/ be relied on.
Well, yes, to be fair I run it over a dyndns by no-ip. But in principle it would work.
Examples are my experimental websites thaddy.org and thaddy.nl, which can change of being hosted by me or the hosting by a flick of a switch - and a bit of time -. For casual users that can be the cheapest solution.
Off-topic: costs for a .com domain may be running out of control in the near future, so maybe I will give that one up and move the lot to thaddy.nl, which is not doing much at the moment. The org and nl domains are not vulnerable to commercial excesses that is now and in the past attempted.
« Last Edit: July 05, 2024, 03:56:11 pm by Thaddy »
My great hero has found the key to the highway. Rest in peace John Mayall.
Playing: "Broken Wings" in your honour. As well as taking out some mouth organs.

MarkMLl

  • Hero Member
  • *****
  • Posts: 7419
Re: Does it require much change to migrate Windows web-server to Linux?
« Reply #12 on: July 05, 2024, 03:46:48 pm »
My business web server- basically, a dummy page since I'd rather present that to customers than something flashy which ran the risk of being hacked- is on AAISP which is occasionally described as one of the more techie-oriented boutique ISPs.

https://hackaday.com/2017/12/14/adsl-robustness-verified-by-running-over-wet-string/

A related company makes highly-regarded routers etc., much used by other small ISPs... so they have a track record. They've also got considerable "form" when it comes to fighting off DDoS attacks, since they've made themselves unpopular in some circles by refusing to do more than the legislated minimum when it comes to cooperating with law enforcement and censorship.

Having set the scene there, they run a web server of their own design which distributes requests based on their content, not on a DNS lookup. Hence, I could in principle have business email hosted by a spam-filtering service and an active website hosted by AAISP, without needing a static IP of my own. Or alternatively, I could simply have a redirect from their public IP4 WWW address to one on local IP4 or IP6 via one of their tunnels.

I'm not saying that they are alone in offering that sort of thing, or that their solutions are the best or the only way of doing it. But I think it's fair to say that the restrictions these days are principally based on what ISPs can and will offer, rather than on what is technically possible.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018