On Sep 21, 2007, at 2:43 PM, Michael Andrews wrote:
I have removed the Listen directive from my config and would like to set it from the command line. I assume that is what the -C/c flags are for:% ./apachectl -C "Listen 8080" -k startI keep getting dumped in to the -help and syntax page of httpd. It does not seem to like the syntax. When I remove the 8080 (the value part to the Listen directive) I get this:% ./apachectl -C "Listen" -k start Syntax error on line 1 of -c/-C directives: Listen requires 1 or 2 arguments.I thought simple quotes would work - but it does not seem to. Any suggestions or insight would be appreciated.
apachectl is a shell script, so you can look inside to see and understand what happens.
As you can see, it is essentially a very thin wrapper around httpd -k $ARGV with ARGV set to whatever came in on the command line. I expects start|stop|restart|graceful|etc., but anything after the -k argument should just sneak in... you'll have to take into account that the shell might strip away a level of quotes, so experiment with
apachectl start -C "\"Listen 8080\"" or something like that. Experiment.Or, depending on your circumstances and the other things apachectl does, just call httpd -k directly.
S. -- Sander Temme sctemme@xxxxxxxxxx PGP FP: 51B4 8727 466A 0BC3 69F4 B7B8 B2BE BC40 1529 24AF
Attachment:
smime.p7s
Description: S/MIME cryptographic signature