If you're already familiar with NetBSD, this information may not be particulary new or useful to you. It's not particularly Atari-specific. I do however use this for my own reference when I install NetBSD/atari.
- Make sure to run through the pkgsrc configuration described in the packages section.
- cd /usr/pkgsrc/www/apache24
- sudo make install
- su to root after the install is done.
- vi /usr/pkg/etc/httpd/httpd.conf
- Optionally uncomment the ServerName directive and set it appropriately.
- Uncomment the "User home directories" line to enable user home directories. If this is enabled, web content is stored in ~[username]/public_html
- To enable WebDAV, uncomment:
Include etc/httpd/httpd-dav.conf - Save and exit vi.
- To enable WebDAV, take the following steps:
- vi /usr/pkg/etc/httpd/httpd-dav.conf
- Uncomment:
- LoadModule userdir_module lib/httpd/mod_userdir.so
- LoadModule dav_lock_module lib/httpd/mod_dav_lock.so
- LoadModule dav_module lib/httpd/mod_dav.so
- LoadModule dav_fs_module lib/httpd/mod_dav_fs.so
- LoadModule auth_digest_module lib/httpd/mod_auth_digest.so
- Optionally change "require user admin" to specify a different username.
- Save and exit vi.
- mkdir /usr/pkg/var
- mkdir /usr/pkg/uploads
- htdigest -c "/usr/pkg/user.passwd" DAV-upload [Username specified above in httpd-dav.conf]
- Enter a password for the user when prompted. This is a username/password pair for digest authentication.
- chmod 640 /usr/pkg/user.passwd
- chgrp www /usr/pkg/user.passwd
- chown -R www /usr/pkg/uploads/
- chgrp -R www /usr/pkg/uploads/
- chown -R www /usr/pkg/var/
- chgrp -R www /usr/pkg/var/
- cp /usr/pkg/share/examples/rc.d/apache /etc/rc.d/apache
- vi /etc/rc.conf
- Add apache=YES
- Save and exit vi.
- shutdown -r now
Apache will be running when the system comes back up. It may not respond for a while while it is starting up. Wait for CPU utilization for httpd to go down to zero and then use another machine on the network to navigate to http://[IP address of server]. You should see "It works!"
If DAV was enabled above the user who was granted access will have read/write access via DAV to the /uploads directory.
Notes:
- To start or stop apache without rebooting, use:
- sh /etc/rc.d/apache start
- sh /etc/rc.d/apache stop