Author Topic: apache2.4 configuration  (Read 4062 times)

Greg Pringle

  • Full Member
  • ***
  • Posts: 149
  • Karma: +0/-0
    • View Profile
apache2.4 configuration
« on: March 24, 2024, 02:25:11 pm »
I am attempting to use apache 2.4 with Python 8.1  and use apachectl to stop the server.
Starting the server runs fine. The httpd.conf file has:
PidFile "d:/apache24/logs/httpd.pid"
and the server creates this file on startup but then "apachectl -k stop" does not work and complains that there is not a pid file.

Does anyone know how to make this work?

David McKenna

  • Hero Member
  • *****
  • Posts: 815
  • Karma: +25/-0
    • View Profile
Re: apache2.4 configuration
« Reply #1 on: March 25, 2024, 12:10:19 am »
Greg,

  Hmm... I get this:

[C:\programs\apache24\bin]apachectl -k stop
SYS1041: The name apachectl is not recognized as an
internal or external command, operable program or batch file.

I'm using Paul's version 2.4.57 of httpd. Maybe report this at his Mantis site: https://mantis.smedley.id.au/my_view_page.php

Regards,

Greg Pringle

  • Full Member
  • ***
  • Posts: 149
  • Karma: +0/-0
    • View Profile
Re: apache2.4 configuration
« Reply #2 on: March 25, 2024, 01:04:34 pm »

apache -k restart

will do the same thing because apachectl is a shell script


David McKenna

  • Hero Member
  • *****
  • Posts: 815
  • Karma: +25/-0
    • View Profile
Re: apache2.4 configuration
« Reply #3 on: March 25, 2024, 02:33:37 pm »
Greg,

  Oops! forgot the 'sh' I now get this:

[C:\programs\apache24\bin]sh apachectl -k stop
apachectl: 101: apachectl: /apache24/bin/httpd: not found

 Definitely something not right...

EDIT: after editing apachectl to have the correct HTTPD directory listed, if I try 'sh apachectl -f /Programs/apache24/conf/httpd.conf -k stop' I get an 'killed by SIGSEGV'  exceptq trap file...

Regards,
« Last Edit: March 25, 2024, 03:25:52 pm by David McKenna »

Greg Pringle

  • Full Member
  • ***
  • Posts: 149
  • Karma: +0/-0
    • View Profile
Re: apache2.4 configuration
« Reply #4 on: March 28, 2024, 12:41:11 pm »
When I have added the -f Httpd.conf entry the pid file is not found.

The pid file holds the correct pid number so if I do a manual kill that does work.
I am not sure that is a good idea. I can write a workaround to automate the kill.

David McKenna

  • Hero Member
  • *****
  • Posts: 815
  • Karma: +25/-0
    • View Profile
Re: apache2.4 configuration
« Reply #5 on: March 28, 2024, 09:20:44 pm »
 Greg,

  That's what I have been doing:

/* Rexx script to shut down Apache */

pid = linein("logs\httpd.pid")
kill.exe pid

 in a CMD file originally installed by AMP for OS/2 way back when. Never tried the apachectl way until you posted. There is an Apache for OS/2 google group you could post on to see if anyone there has experience with apachectl...

Regards,