how to use httpd command with its examples

  • About httpd : Apache Hypertext Transfer Protocol Server
  • It comes from “httpd-2.2.15” package.

Examples:

1. To set the initial value for the server root

$ httpd -d /var/tmp/

2. To set the config file

$ httpd -c /etc/myconfig.conf

3. To start/restart/stop the apache web service

$ httpd start
$ httpd stop
$ httpd restart
$ httpd graceful
$ httpd graceful-stop

4. To process the config directive before reading config file

$ httpd -C

5. To process the config directive before reading config file

$ httpd -c

6. To set a configuration parameter

$ httpd -D

7. To set the log level for the http daemon

$ httpd -e

8. To sent error message during server startup to file

$ httpd -E /tmp/error.log

9. To set the directory for shared object files

$ httpd -R /dri/path

10. To get the help for httpd

$ httpd -h

11. To see the list of modules compiled into the server

$ httpd -l

12. To see the list of directives

$ httpd -L

13. To see the list of static and loaded modules

$ httpd -M

14. To see the settings parsed from the configuration file

$ httpd -S

15. To run syntax test for config files only

$ httpd -t

16. To print the version of httpd

$ httpd -v

17. To print the version and build parameters of httpd

$ httpd -V

18. To run the httpd in debu mode

$ httpd -X

19. To install apache as Windows NT sevice

$ httpd -k install
$ httpd -k config
$ httpd -k uninstall

20. The name of the Apache service to signal

$ httpd -n name

21. To keep the console window open on error so that the error message can be read

$ httpd -w

Leave a Reply

Your email address will not be published. Required fields are marked *