Apache Update Today

I take the unusual measure of hosting this site, and this blog, on my home computer, which I name ‘Phoenix’. This requires that I forward all requests to my URL, to My Home IP Address. Hence, if you’re on a Linux computer and want my current IP address, you’d just type in:


host dirkmittler.homeip.net


But of course, in order to host a Web-site, I also need to be running a fully-configured Web-server. Under Linux, this pretty much implies running Apache.

The version of Apache on this box was just updated this evening, to version ‘2.4.10-10+deb8u10‘. When the server is updated like this, a post-install command is also given to restart it, since otherwise the new software will not have been loaded into RAM, nor running. But this should not cause much of a disruption, because essentially it just causes a connection to disappear for about 2 seconds.

The reason for that would be, the fact that each HTTP Request is handled separately, and after each HTTP Request has fetched a page, or an update to a page, the CGI-Script that did so exits. This means that if the reader is noticing a ‘stateful session’, which has persistent data from one page-reload to the next, this actually requires that a database act as a back-end to the site, and that the Web-server’s CGI-Scripts can act as a client to that database. And cookies on the browser, in certain cases, identify a session. For readers of this blog who are not logged-in, such cookies are not being used.

In my case, it’s a MySQL server.

One thing that might however happen to a reader, due to such a server-restart, is that an established session gets interrupted momentarily. This would have happened around 19h45 this evening.

The reason that can happen, is the use of Web-sockets on this site. Essentially, only the browser’s initial request to connect, is actually made to Port 80 of the server. After that, the session of one particular browser (client) is handed off to a Web-socket, which is actually some obscure port on my computer, owned by an Apache sub-process.

If the sub-process is killed, any browsers that were still connected to it would have experienced a disconnection. Because browsers tend to ‘remember’ which Web-socket they were connected to when simply prompted to reload a page, this disconnection might last until the reader restarts his browser.

Continue reading Apache Update Today

SSL Certificate Update Runs In Background Successfully Now.

For the parts of my Web-site – that have nothing to do with my blog – which use SSL, I have been subscribing to certificates from ‘Let’s Encrypt‘. These certificates have as their basis a ‘Certbot‘ robot, that runs on each subscribing server, and that tries to renew certificates when the time has come to do so.

On some past occasions, this robot has failed to do this in the background, requiring that I manually restart my Apache Web-server.

Due to the recent ‘normalization’ of my server-configuration – setting Apache to listen on port 443 again – I’m happy to find out that the Certbot has renewed my SSL Certificate as a background task, without requiring my manual participation, and that it was able to restart Apache as well, without resulting any any disruption, to the availability of my blog to readers. Yay!



Routine Apache Server Update Today

One fact which I mention often, is that I use my home computer, which I name ‘Phoenix’, as a Web-server, and as the hosting server for this blog.

For any readers who have questions on how this is possible, I’d direct you Here.

Updates which are somewhat remarkable, such as an actual update to the Web-server, but which seemed to take place without any technical problems, I document in this blog as ‘routine updates’.

The update to my Apache Web-server, that brought it up to version ‘2.4.10-10+deb8u9‘, just took place today. Doing so actually does require a restart of the server. But that kind of restart simply takes place within a few seconds, and without any detriment to the availability of the site, because of the way Web-servers generally work.



Routine PHP Update This Morning

This morning, the computer that hosts my Web-site received a routine update to its PHP 5 interpreter – i.e. to some of the modules of its PHP 5 system – which also triggered a routine restart of the Apache server processes. This has taken place without causing the slightest disruption to my site.

What most Linux-based services do, during a log-rotation, is also to restart, so that after the log-files have been renamed, the services obtain a new file-handle as well, and so that the actual writing of log data resumes with a newly-created log-file. Apache tends to be atypical, in that one of its available commands is to reload its configuration and/or its log-files. Thus, usually, the main Apache service just keeps running.

Technically, this morning, the Apache server was gone for two seconds. But, if an average reader was to find that this interfered with his browsing, he would have been able to fix that, just by clicking on the same URL a second time.

Also, my blog consists of PHP scripts, which every HTTP request executes independently of the other requests. Persistence is achieved by browser-scripts, and by a MySQL database which the server-scripts access. So there is also no loss of persistence, of my site, arising from an Apache server restart.


Continue reading Routine PHP Update This Morning