Welcome to the Slackware Documentation Project

This is an old revision of the document!

Setup Apache httpd server

This is a general how to to get a basic httpd service up and running.

Applies to:
Slackware 14.1 (and possibly previous versions)
Apache 2 (and possibly previous versions)


1) edit /etc/httpd/httpd.conf and change/uncomment the following lines:

vi /etc/httpd/httpd.conf

ServerAdmin you@example.com  <---OPTIONAL
ServerName www.myawesomeserver.com:80
Include /etc/httpd/extra/httpd-autoindex.conf <---OPTIONAL
Include /etc/httpd/extra/httpd-default.conf   <---OPTIONAL

All other default settings should be good.

HINT: With these settings, your default webpages should be put in /var/www/htdocs. Your default logs should be under /var/log/httpd.

2) Make it start on boot.

chmod 755 /etc/rc.d/rc.httpd
/etc/rc.d/rc.httpd start


This will allow users to have individual web space (/home/USER/public_html). These can be accessed from the web by adding “~USERNAME” to the URL.

1) Edit /etc/httpd/httpd.conf, change/uncomment the following:

 vi /etc/httpd/httpd.conf

  LoadModule authz_host_module lib64/httpd/modules/mod_authz_host.so
  LoadModule authz_user_module lib64/httpd/modules/mod_authz_user.so
  LoadModule authz_core_module lib64/httpd/modules/mod_authz_core.so
  LoadModule userdir_module lib64/httpd/modules/mod_userdir.so
  Include /etc/httpd/extra/httpd-userdir.conf

2) Edit /etc/httpd/extra/httpd-userdir.conf, change/uncomment the following:

vi /etc/httpd/extra/httpd-userdir.conf

  <Directory "/home/*/public_html">
      AllowOverride FileInfo AuthConfig Limit Indexes
      Options MultiViews Indexes SymLinksIfOwnerMatch
      Require method GET POST OPTIONS

3) Restart Apache

/etc/rc.d/rc.httpd restart


In Other Languages
Translations of this page?:
QR Code
QR Code howtos:network_services:setup_apache (generated for current page)