Slackware HowTo

Configure Apache httpd on Slackware (base)

Service start, initial configuration, and Apache testing on Slackware.

1. Enable and start httpd

chmod +x /etc/rc.d/rc.httpd
/etc/rc.d/rc.httpd start

2. Main files

3. Test configuration

apachectl configtest
/etc/rc.d/rc.httpd restart
If configtest returns Syntax OK, the base configuration is valid.

4. Test page

echo '<h1>Slackware Apache OK</h1>' > /var/www/htdocs/index.html

5. Checks

ss -tulpen | grep ':80'
tail -n 50 /var/log/httpd/error_log

6. Basic VirtualHost (example)

<VirtualHost *:80>
  ServerName example.local
  DocumentRoot /srv/www/example
  ErrorLog /var/log/httpd/example-error.log
  CustomLog /var/log/httpd/example-access.log combined
</VirtualHost>

Create the directory and consistent permissions before restarting.

Quick checklist

[ ] rc.httpd enabled
[ ] httpd.conf tested with apachectl configtest
[ ] Port 80 listening
[ ] Logs checked
[ ] DocumentRoot/VirtualHost verified

Back to the Linux HowTo section