Author Topic: Migrating Apache Web Server  (Read 960 times)

Neil Waldhauer

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 31
  • Posts: 446
    • View Profile
    • Blonde Guy
Migrating Apache Web Server
« 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?
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Ian Manners

  • Global Moderator
  • Sr. Member
  • *****
  • Thank You
  • -Given: 36
  • -Receive: 26
  • Posts: 319
  • I am the computer, it is me.
    • View Profile
    • ComKal Networks Australia
Re: Migrating Apache Web Server
« Reply #1 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.
Cheers
Ian B Manners

Neil Waldhauer

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 31
  • Posts: 446
    • View Profile
    • Blonde Guy
Re: Migrating Apache Web Server
« Reply #2 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

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?
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 10
  • -Receive: 145
  • Posts: 2068
    • View Profile
Re: Migrating Apache Web Server
« Reply #3 on: September 07, 2019, 06:16:01 pm »
I think Lewis has mentioned having to do regular reboots, you might want to ask him.

Paul Smedley

  • Sr. Member
  • ****
  • Thank You
  • -Given: 11
  • -Receive: 53
  • Posts: 446
    • View Profile
Re: Migrating Apache Web Server
« Reply #4 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

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

Neil Waldhauer

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 31
  • Posts: 446
    • View Profile
    • Blonde Guy
Re: Migrating Apache Web Server
« Reply #5 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?
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Paul Smedley

  • Sr. Member
  • ****
  • Thank You
  • -Given: 11
  • -Receive: 53
  • Posts: 446
    • View Profile
Re: Migrating Apache Web Server
« Reply #6 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

Neil Waldhauer

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 31
  • Posts: 446
    • View Profile
    • Blonde Guy
Re: Migrating Apache Web Server
« Reply #7 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.
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com