From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,27c24ba68e621eef X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,CP1252 Path: g2news1.google.com!news4.google.com!news.glorb.com!newspeer1.se.telia.net!se.telia.net!masternews.telia.net.!newsb.telia.net.POSTED!not-for-mail From: =?windows-1252?Q?Bj=F6rn_Persson?= User-Agent: Mozilla Thunderbird 1.0.2-1.3.3 (X11/20050513) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: AWS applications and domain hosting References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Message-ID: Date: Sun, 26 Jun 2005 23:00:44 GMT NNTP-Posting-Host: 217.209.116.179 X-Complaints-To: abuse@telia.com X-Trace: newsb.telia.net 1119826844 217.209.116.179 (Mon, 27 Jun 2005 01:00:44 CEST) NNTP-Posting-Date: Mon, 27 Jun 2005 01:00:44 CEST Organization: Telia Internet Xref: g2news1.google.com comp.lang.ada:11675 Date: 2005-06-26T23:00:44+00:00 List-Id: Marius Amado Alves wrote: > As others have told, yes, domain and hosting are formally separate. But > many hosts offer registration, e.g. Yahoo!, and often the package price > beats buying the two things separately. You might want to make sure that it's you and not the hosting company who owns the domain, so that you can change the hosting solution without losing your domain name. > I think that, unlike someone else said, a separate web server, or proxy > (Apache), is neither required nor useful. The host system only has to > open a port (?) to AWS sockets, right? And allow the AWS-based > executable to run with the right > parameters/permissions/ownership/priorities... If we're talking web servers, we're talking HTTP. HTTP builds on TCP which builds on IP. TCP has the notion of ports. A port is a number that serves to keep separate connections distinct. Clients need to know which port the server is listening for connections on. HTTP normally uses port 80. (TCP's "little sister" protocol UDP has an identical but separate set of ports.) In Unixy operating systems, the kernel implements IP and TCP. Applications access the network through the sockets API. A program that wants to act as a web server opens a listening TCP socket on port 80. (This will fail if another process is already listening on port 80. Only one process at a time can use a given port number.) When traffic to port 80 arrives, the TCP layer in the kernel sets up a connection. The program recieves a connection socket from its listening socket. Server and client can then start speaking HTTP. To use port numbers below 1024 you must be root in Unixy systems. (There might be exceptions.) But programs shouldn't run as root if it can be avoided, because then they can do a lot of damage if anything goes wrong. The usual solution is to start the program as root, but as soon as it has opened its listening socket, the program switches to an unprivileged user account and runs as that user from then on. Anyway, you need root access to let your program use port 80. According to what I've read about AWS, it implements HTTP and interfaces to the sockets API, so it doesn't need Apache. I can imagine that it might be useful to have a regular web server beside an AWS application, but then one of them will have to use a nonstandard port. Some kind of proxy could of course accept a connection on port 80, open another connection to an AWS application on another port, and forward traffic between them. If your application isn't meant to be used by humans through web browsers, it may make more sense not to use port 80. IPP for example, the Internet printing protocol, is built on top of HTTP but has its own port � number 631. -- Bj�rn Persson PGP key A88682FD omb jor ers @sv ge. r o.b n.p son eri nu