The httpd command is used to start the Apache HTTP Server on Unix-like systems. It is a web server that serves static files and handles HTTP requests.
Basic Usage:
httpd
Example:
$ httpd
Notes:
- This command starts the server and listens on port 80 (default).
- You can start the server with a configuration file using:
httpd -f /path/to/httpd.conf
Common Commands:
- Start the server:
httpd - Stop the server:
systemctl stop httpd - Restart the server:
systemctl restart httpd - Check status:
systemctl status httpd
For Linux (Debian/Ubuntu):
sudo systemctl start httpd
For CentOS/RHEL:
sudo systemctl start httpd
For macOS (using Homebrew):
brew services start httpd
If you're using a different web server (like Nginx), you would use:
- Nginx:
nginx
Let me know if you need help with configuring Apache or Nginx!