Skip to content

apachectl: Pass the arguments of "configtest" on to httpd (BZ 69950) - #869

Closed
arturobernalg wants to merge 1 commit into
apache:trunkfrom
arturobernalg:fix/httpd-69950-apachectl-configtest-args
Closed

arturobernalg wants to merge 1 commit into
apache:trunkfrom
arturobernalg:fix/httpd-69950-apachectl-configtest-args

Conversation

@arturobernalg

@arturobernalg arturobernalg commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Bugzilla: https://bz.apache.org/bugzilla/show_bug.cgi?id=69950

apachectl configtest runs httpd -t and drops any further argument, so apachectl configtest -f file tests the default configuration instead of the given file. The arguments following the command are now passed on to httpd. start, stop and the other commands already pass them, and configtest without arguments behaves as before.

Checked by generating apachectl from the template, before and after, against a built httpd:

  • configtest -f bad.conf: before, the default configuration is read; after, the syntax error in bad.conf is reported, exit 1.
  • configtest -f good.conf: before, the default configuration is read; after, Syntax OK, exit 0.
  • configtest without arguments, -t -f good.conf and start -f bad.conf behave the same as before.

Limits: the form with the option first, apachectl -f file configtest, still prints the usage text, as the report describes the other form. There is no automated test, as apachectl has no test suite.


  • This PR does not report or address a security vulnerability
    (see SECURITY.md and
    https://www.apache.org/security/#reporting-a-vulnerability).
  • Code follows the httpd style guide.
  • New log messages (level debug or higher) use an empty APLOGNO() tag;
    numbers are assigned by a committer at merge time (see docs/log-message-tags/README).
  • If the change is user-visible, a changes-entries/*.txt file is included,
    following the template in README.CHANGES (not needed otherwise).
  • Test cases based on pyhttpd are included where appropriate, in the
    test/modules/xxx directory matching the modules/xxx module source,
    or test/modules/core for core server changes. On Unix, verify these
    pass locally with e.g. make check-pytest PYTEST_DIRS=test/modules/xxx.

"apachectl configtest" ran "httpd -t" and dropped any further argument, so
"apachectl configtest -f file" tested the default configuration instead of
the given file. The arguments following the command are now passed on.

PR 69950.
@arturobernalg
arturobernalg force-pushed the fix/httpd-69950-apachectl-configtest-args branch from 62039be to f0c3038 Compare October 25, 2026 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant