Re: Ada/GNAT/AWS-friendly web hosting

Liste des GroupesRevenir à cl ada 
Sujet : Re: Ada/GNAT/AWS-friendly web hosting
De : Bjorn (at) *nospam* xn--rombobjrn-67a.se (Björn Persson)
Groupes : comp.lang.ada
Date : 13. Sep 2024, 16:33:15
Autres entêtes
Message-ID : <20240913163315.7ec71431@tag.xn--rombobjrn-67a.se>
References : 1
User-Agent : Claws Mail 4.3.0 (GTK 3.24.43; x86_64-redhat-linux-gnu)
Marius Alves wrote:
Researching how to build an HTTP server (serving a website) on a local
machine (MacOS) using AWS (Ada Web Server) and deploy it on a web
hosting provider (e.g. 1dollar-webhosting.com).

I don't know about 1dollar, but a typical web hosting provider will
only let you upload static files (HTML, pictures et cetera), limited
snippets of web server configuration, and certain kinds of programs
that run under their web server's control. PHP is common. Some might
run Perl programs with mod_perl, or Python programs using WSGI.

Maybe some web hosts support CGI or FastCGI. Those interfaces can be
implemented in Ada. I think you'll have limited use for AWS in that
case, as the HTTP parsing is handled by the web server.

I think it would be hard to find a web host that lets you run arbitrary
network-facing daemons. To run your own web server you want a VPS (or a
physical server in a collocation facility, but if your security needs
don't rule out a web host, then a VPS is also fine).

The host is already running an HTTP server program (probably Apache).
Must it be turned off? How?

A typical web host won't let you turn off their web server. They serve
many customers' content from the same Apache instance, so turning that
off would break all those websites.

In general, can the executable be launched on a VPS (Virtual Private
Server)?

Sure. In a VPS you have the whole operating system to yourself (maybe
except for the kernel if the VPS provider uses OpenVZ). You install and
run whatever programs you want, just like on your own physical computer.
Maybe you'll be able to get a VPS with MacOS, if that's your preference.

In a VPS it's also your responsibility to install updates regularly,
and upgrade to a new major OS version from time to time. If you fail to
keep up, then criminals will take over your VPS and use it as a relay
when attacking others. Make sure that you'll be notified automatically
when there are updates to install.

If the host runs on Linux then cross-building (from MacOS to Linux)
required, right? GNAT does that, right?

GCC – and thus GNAT – can be built as a cross-compiler. Perhaps you
can find one that someone has built and packaged for MacOS. Otherwise
you'll need to build your own from the GCC source code, configuring it
to be a cross-compiler. (That's theoretical knowledge. I have no
practical experience with cross-compilation).

Or, must the program be built in the host? (Thus requiring GNAT be there.)

No, but in my opinion it's much easier that way. Either build on the
computer you'll run on, or on another computer of the same processor
architecture, running the same version of the same operating system.
That way you don't need to worry about getting the wrong version of
some library or build tool.

Will dynamic linking work? I'm guessing not, so, static; but then, will
GNAT integrate the right libraries for Linux in the executable?

Cross-compilation should be able to work with shared libraries.
Regardless of whether the libraries are shared or static, libraries for
the target machine must be available on the build host. I guess you
would either install packaged libraries on the target machine, and copy
those to the build host, or else cross-compile the libraries too. You
need to configure search paths carefully so that both the compiler and
the linker find the cross-libraries instead of the native ones. This is
one of the complications you avoid by building natively.

Which port?

Normally port 443, because of course you'll use HTTPS, won't you?
Optionally you can also have an HTTP server on port 80 that responds to
every request with a redirection to HTTPS.

If you choose to put AWS behind a reverse proxy like DrPi suggested,
then the reverse proxy listens on port 443 on your public IP address,
and you tell AWS to listen on some other port and only on the localhost
address, ::1 or 127.0.0.1.

Björn Persson


Date Sujet#  Auteur
12 Sep 24 * Ada/GNAT/AWS-friendly web hosting27Marius Alves
12 Sep 24 +- Re: Ada/GNAT/AWS-friendly web hosting1J-P. Rosen
12 Sep 24 +* Re: Ada/GNAT/AWS-friendly web hosting7DrPi
12 Sep 24 i+* Re: Ada/GNAT/AWS-friendly web hosting5J-P. Rosen
12 Sep 24 ii+- Re: Ada/GNAT/AWS-friendly web hosting1Kevin Chadwick
13 Sep 24 ii`* Re: Ada/GNAT/AWS-friendly web hosting3Lawrence D'Oliveiro
13 Sep 24 ii +- Re: Ada/GNAT/AWS-friendly web hosting1J-P. Rosen
14 Sep 24 ii `- Re: Ada/GNAT/AWS-friendly web hosting1Randy Brukardt
13 Sep 24 i`- Re: Ada/GNAT/AWS-friendly web hosting1Lawrence D'Oliveiro
12 Sep 24 +* Re: Ada/GNAT/AWS-friendly web hosting3Jeffrey R.Carter
13 Sep 24 i`* Re: Ada/GNAT/AWS-friendly web hosting2Lawrence D'Oliveiro
13 Sep 24 i `- Re: Ada/GNAT/AWS-friendly web hosting1Jeffrey R.Carter
12 Sep 24 +- Re: Ada/GNAT/AWS-friendly web hosting1Dmitry A. Kazakov
13 Sep 24 +- Re: Ada/GNAT/AWS-friendly web hosting1Stéphane Rivière
13 Sep 24 +* Re: Ada/GNAT/AWS-friendly web hosting12Björn Persson
14 Sep 24 i`* Re: Ada/GNAT/AWS-friendly web hosting11Lawrence D'Oliveiro
14 Sep 24 i `* Re: Ada/GNAT/AWS-friendly web hosting10Stéphane Rivière
14 Sep 24 i  `* Re: Ada/GNAT/AWS-friendly web hosting9Lawrence D'Oliveiro
14 Sep 24 i   `* Re: Ada/GNAT/AWS-friendly web hosting8Stéphane Rivière
14 Sep 24 i    `* Re: Ada/GNAT/AWS-friendly web hosting7Lawrence D'Oliveiro
14 Sep 24 i     `* Re: Ada/GNAT/AWS-friendly web hosting6Stéphane Rivière
14 Sep 24 i      `* Re: Ada/GNAT/AWS-friendly web hosting5Kevin Chadwick
14 Sep 24 i       `* Re: Ada/GNAT/AWS-friendly web hosting4Stéphane Rivière
14 Sep 24 i        `* Re: Ada/GNAT/AWS-friendly web hosting3Jeffrey R.Carter
14 Sep 24 i         `* Re: Ada/GNAT/AWS-friendly web hosting2Stéphane Rivière
14 Sep 24 i          `- Re: Ada/GNAT/AWS-friendly web hosting1Jeffrey R.Carter
13 Sep 24 `- Re: Ada/GNAT/AWS-friendly web hosting1Nioclás Pól Caileán de Ghloucester

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal