OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Web applications => Topic started by: Neil Waldhauer on July 24, 2019, 03:41:37 pm

Title: Migrating Apache Web Server
Post by: Neil Waldhauer on July 24, 2019, 03:41:37 pm
I tried posting in the Google Group "Apache for OS/2", but my post disappeared so I'll try here, too.

I'm helping someone migrate from an old website hosted by OS/2 on an IBM 300 GL machine running Apache 1.3.6. The website is pretty old-school, but it has a Flash splash page.

The target machine is an IBM M-Pro, so not that much newer, but it has a working web server, Apache 2.2.23 installed as a part of the last OS/2 AMP release. It was hosting another simple website.

Looking at it, we thought to just transfer the HTDOCS directory replacing the one on the newer M-Pro with the one from the older 300 GL. This mostly works.

The problems are that web pages seem to fail to load on the first request from a browser, then the second and subsequent attempts seem to work. In addition, I can't seem to get the Flash screen to appear. (OK, on operating systems like OS/2 that do not have Flash, it's just a black page, but instead, requests for the .swf file just seem to try forever.

Those problems seem to be connected with a reconfiguration. How can I find documentation for Apache for OS/2, particularly something related to getting started?
Title: Re: Migrating Apache Web Server
Post by: Ian Manners on July 24, 2019, 04:50:10 pm
Hi Neil,

Moving from v1.3.41 to v2.2.something, I got there from addressing the errors that appeared in the error log.
Maybe try updating Apache 1.3.6 to Apache 1.3.41 first before going to the Apache v2.x.x branch.

in httpd.conf for error reporting, I have the following:

    ErrorLog logs/error.log
    LogLevel warn

You should be able to find other error levels by googling.
Title: Re: Migrating Apache Web Server
Post by: Neil Waldhauer on September 07, 2019, 05:34:45 pm
I selected Paul Smedley's latest Apache 2.2 HTTPD

https://os2ports.smedley.id.au/index.php?page=apache2 (https://os2ports.smedley.id.au/index.php?page=apache2)

I adjusted the conf/httpd.conf, and the website is running.

But not all is well. The server stops serving after a few days. Is anyone running this software? The logs seem to show nothing unusual, and there isn't really very much traffic. What could cause the server to stop?
Title: Re: Migrating Apache Web Server
Post by: Dave Yeo on September 07, 2019, 06:16:01 pm
I think Lewis has mentioned having to do regular reboots, you might want to ask him.
Title: Re: Migrating Apache Web Server
Post by: Paul Smedley on September 08, 2019, 12:13:07 am
Hey Neil,

I selected Paul Smedley's latest Apache 2.2 HTTPD

https://os2ports.smedley.id.au/index.php?page=apache2 (https://os2ports.smedley.id.au/index.php?page=apache2)

I adjusted the conf/httpd.conf, and the website is running.

But not all is well. The server stops serving after a few days. Is anyone running this software? The logs seem to show nothing unusual, and there isn't really very much traffic. What could cause the server to stop?

Lewis, Massimo and a few others are using the 2019 build on their server with reasonable success.

One of the keys is to make sure you have a valid setting for MaxRequestsPerChild - I suggest 1000 based on the below from Lewis...

Code: [Select]
I can report a similar experience.

I'm currently running with MaxRequestsPerChild of 1000, and have seen uptime of over 10 days, no more every-four-hour scheduled daemon restarts and no more every-three-days scheduled server reboots. Memory consumption seems generally low (under 1GB in use under normal operating conditions, and memory is returned to the pool when load decreases - wow!).

I had an issue yesterday where the server fell over, but I think we were being hammered. After the restart and the inevitable autocheck passes, the server has been up.

Nice work, Paul!

Cheers,

Paul
Title: Re: Migrating Apache Web Server
Post by: Neil Waldhauer on September 08, 2019, 03:39:09 pm
I can see the parameter set in conf\extra\httpd-mpm.conf

But this is not loaded by default. Nor is any LoadModule found for mpm_mpmt_os2_module. Looking at the module directory, I don't see it there.

I'm not sure what to activate to use the MaxRequestsPerChild directive. Should I just put it in httpd.conf by itself?
Title: Re: Migrating Apache Web Server
Post by: Paul Smedley on September 09, 2019, 04:41:50 am
Hey Neil

I can see the parameter set in conf\extra\httpd-mpm.conf

But this is not loaded by default. Nor is any LoadModule found for mpm_mpmt_os2_module. Looking at the module directory, I don't see it there.

I'm not sure what to activate to use the MaxRequestsPerChild directive. Should I just put it in httpd.conf by itself?

Check httpd.conf.sample in the distribution - I think this should have a valid MaxRequestsPerChild  directive example in there - if it doesn't - shame on me :)

Cheers,

Paul
Title: Re: Migrating Apache Web Server
Post by: Neil Waldhauer on September 10, 2019, 03:45:27 pm
It's in extra\httpd-mpm.conf

I just had to modify httpd.conf to include extra\httpd-mpm.conf

And also change the name from MaxConnectionsPerChild to MaxRequestsPerChild

The default is 0, but I changed that to 1000.
Title: Re: Migrating Apache Web Server
Post by: Neil Waldhauer on October 06, 2019, 06:37:29 pm
Still no luck on stability. I'm wondering about the server machine being too old.

The symptom is that the machine stops serving. There is no error in the logs that we can see.

This is an IBM MPro with MCP 2r. The owner is reluctant to change things on the machine.

How important would it be to have an rpm/yum Unix compatibility system on the machine? I think it does not, but I will check if that looks like a significant issue.

Apache seems to run for a long time on ArcaOS with yum update to the current level.
Title: Re: Migrating Apache Web Server
Post by: Paul Smedley on October 07, 2019, 03:11:50 am
Hey Neil,

Still no luck on stability. I'm wondering about the server machine being too old.

The symptom is that the machine stops serving. There is no error in the logs that we can see.

This is an IBM MPro with MCP 2r. The owner is reluctant to change things on the machine.

How important would it be to have an rpm/yum Unix compatibility system on the machine? I think it does not, but I will check if that looks like a significant issue.

Apache seems to run for a long time on ArcaOS with yum update to the current level.

The only important things for stability are latest libcx and libc066 DLL's - you shouldn't need a full rpm/yum setup.

Cheers,

Paul.