Special web site forcusing on FreeBSD server, Linux desktop, and miscellaneous issue.
At last, server software installation starts. In this section, I made reference to “FreeBSD Expert 2005,” FreeBSD Expert editorial office (2005) Gijutsu hyoron sha (Japanese) and “Guide of Construct WebDAV system,” Kunio Miyamoto, Yasushi Yamada, and Tsuyoshi Watanabe (2003) Gijutsu hyoron sha (Japanese).
Autoconf is maybe already installed.
> cd /usr/ports/devel/autoconf259
> sudo make install clean
Though BerkeleyDB has many versions, you will be forced to install version 4.2. Thus,
> cd /usr/ports/databases/db42
> sudo make install clean
> cd /usr/ports/textproc/expat2
> sudo make install clean
This may leads following error message, and stop installation.
===> expat-2.0.0_1 is already installed
You may wish to ``make deinstall'' and install this port again
by ``make reinstall'' to upgrade it properly.
If you really wish to overwrite the old port of textproc/expat2
without deleting it first, set the variable "FORCE_PKG_REGISTER"
in your environment or the "make install" command line.
*** Error code 1
Stop in /usr/ports/textproc/expat2.
Thus following instructions,
> sudo make deinstall
> sudo make reinstall
This makes expat2 to latest version installed.
I use Apache, latest version 2.2.
> cd /usr/ports/www/apache22
> sudo make WITH_BERKELEYDB=db42 -DWITH_LDAP install clean
My configuration of Apache 2.2 is listed below.
Options for apache 2.2.9 [ ] APR_FROM_PORTS Use devel/apr as APR (beware!) [ ] THREADS Enable threads support in APR [X] MYSQL Enable MySQL support for apr-dbd [ ] PGSQL Enable PostgreSQL support for apr-dbd [ ] SQLITE Enable SQLite support for apr-dbd [X] IPV6 Enable IPv6 support [ ] PCRE_FROM_PORTS Use devel/pcre instead of bundled one [X] BDB Enable BerkeleyDB dbm [X] AUTH_BASIC Enable mod_auth_basic [X] AUTH_DIGEST Enable mod_auth_digest [X] AUTHN_FILE Enable mod_authn_file [ ] AUTHN_DBD Enable mod_authn_dbd [X] AUTHN_DBM Enable mod_authn_dbm [X] AUTHN_ANON Enable mod_authn_anon [X] AUTHN_DEFAULT Enable mod_authn_default [X] AUTHN_ALIAS Enable mod_authn_alias [X] AUTHZ_HOST Enable mod_authz_host [X] AUTHZ_GROUPFILE Enable mod_authz_groupfile [X] AUTHZ_USER Enable mod_authz_user [X] AUTHZ_DBM Enable mod_authz_dbm [X] AUTHZ_OWNER Enable mod_authz_owner [X] AUTHZ_DEFAULT Enable mod_authz_default [X] CACHE Enable mod_cache [X] DISK_CACHE Enable mod_disk_cache [X] FILE_CACHE Enable mod_file_cache [ ] MEM_CACHE Enable mod_mem_cache [X] DAV Enable mod_dav [X] DAV_FS Enable mod_dav_fs [ ] BUCKETEER Enable mod_bucketeer [ ] CASE_FILTER Enable mod_case_filter [ ] CASE_FILTER_IN Enable mod_case_filter_in [ ] EXT_FILTER Enable mod_ext_filter [ ] LOG_FORENSIC Enable mod_log_forensic [ ] OPTIONAL_HOOK_EXPORT Enable mod_optional_hook_export [ ] OPTIONAL_HOOK_IMPORT Enable mod_optional_hook_import [ ] OPTIONAL_FN_IMPORT Enable mod_optional_fn_import [ ] OPTIONAL_FN_EXPORT Enable mod_optional_fn_export [ ] LDAP Enable mod_ldap [ ] AUTHNZ_LDAP Enable mod_authnz_ldap [X] ACTIONS Enable mod_actions [X] ALIAS Enable mod_alias [X] ASIS Enable mod_asis [X] AUTOINDEX Enable mod_autoindex [X] CERN_META Enable mod_cern_meta [X] CGI Enable mod_cgi [X] CHARSET_LITE Enable mod_charset_lite [ ] DBD Enable mod_dbd [X] DEFLATE Enable mod_deflate [X] DIR Enable mod_dir [X] DUMPIO Enable mod_dumpio [X] ENV Enable mod_env [X] EXPIRES Enable mod_expires [X] HEADERS Enable mod_headers [X] IMAGEMAP Enable mod_imagemap [X] INCLUDE Enable mod_include [X] INFO Enable mod_info [X] LOG_CONFIG Enable mod_log_config [X] LOGIO Enable mod_logio [X] MIME Enable mod_mime [X] MIME_MAGIC Enable mod_mime_magic [X] NEGOTIATION Enable mod_negotiation [X] REWRITE Enable mod_rewrite [X] SETENVIF Enable mod_setenvif [X] SPELING Enable mod_speling [X] STATUS Enable mod_status [X] UNIQUE_ID Enable mod_unique_id [X] USERDIR Enable mod_userdir [X] USERTRACK Enable mod_usertrack [X] VHOST_ALIAS Enable mod_vhost_alias [X] FILTER Enable mod_filter [X] VERSION Enable mod_version [ ] PROXY Enable mod_proxy [ ] PROXY_CONNECT Enable mod_proxy_connect [ ] PROXY_FTP Enable mod_proxy_ftp [ ] PROXY_HTTP Enable mod_proxy_http [ ] PROXY_AJP Enable mod_proxy_ajp [ ] PROXY_BALANCER Enable mod_proxy_balancer [X] SSL Enable mod_ssl [ ] SUEXEC Enable mod_suexec [ ] CGID Enable mod_cgid
After installation, configure Apache by editing httpd.conf file by vi editor.
> sudo vi /usr/local/etc/apache22/httpd.conf
First, remove all comment out mark in the lines begining LoadModule. Imprement every module to Apache. Especially, the line including dav_module and dav_fs_module is essential to DAV function.
Subsequently, in this file, the part of
#ServerName www.example.com:80
Remove comment out mark and input your machine's IP address or alter like
ServerName localhost:80
Finally, configuration of /etc/rc.conf. Open this file and add line below to end of file.
apache22_enable="YES"
That is all. Basic configuration of Apache is terminated. Reboot your machine and access from other machine in your LAN by using browser (type http://(the machine's IP address)/). If a page saying “It Works” appears, all goes well though the page is rather brusque.
To append version control function to Apache, Subversion is needed. Install it as described below.
> cd /usr/ports/devel/subversion
> sudo make -DWITH_MOD_DAV_SVN install clean
Place dav.conf file at /usr/local/etc/apache22/Include directory. In this directory all *.conf files are treated as a part of httpd.conf file.
> sudo vi /usr/local/etc/apache22/Includes/dav.conf
The content of this file is described below.
Alias /dav /home/dav
DAVLockDB /tmp/DAVLock
<Location /dav>
DAV on
Order deny,allow
Allow from All
</Location>
Locate DAV directory indicated above and set directory owner appropriately.
> cd /home
> sudo mkdir dav
> sudo chown www:www dav
After these operations above, configurations Apache including DAV function and Subversion are completed. After rebooting your machine, access form another computer with URL of http://(your machine's address)/dav/.
Here again, in this site, it is assumed the FreeBSD machine is located inside firewall. If you place your machine configured like above outside firewall, direct to internet, or in DMZ, cope with security matter.
Incidentally, to access to your WebDAV server form Windows xp with basic authentication, remove check at “use unified windows authentication” off at “detail option” of IE (I am not sure this is correct translation. English version IE may show different representation.) and add “?” mark in the end of access URL.