pkg_add -rv apacheAdded the lines:
ServerName wwwSupposing my hostname is dvorak, I need to edit
vi /etc/hostsand add the line:
127.0.0.1 dvorakAnd now
apachectl startThe DocumentRoot is /usr/local/www/data in this default configuration.
Great. Now it "works" but being given the default config, right now I can't enter non-Latin characters in files/filenames. I'd basically need UTF-8 exported as charset. The solution is to make use of ~/.login_conf.
For a minimalistic ~/.login_conf, I need to do:
echo "me:\" >> ~/.login_confWheee now I can enter stuff such as "şţăîâабкдеф" in the terminal!
echo ":charset=UTF-8:\" >> ~/.login_conf
echo ":lang= en_US.UTF-8" >> ~/.login_conf
More on setting locales (via ~/.login_conf) in the FreeBSD handbook.
Next on, I need to make apache know of UTF-8:
echo "AddDefaultCharset utf-8" >> /usr/local/etc/apache/httpd.confVoilà!
Just one more thing: in order to have apache started automatically at each boot, I need an entry in /etc/rc.conf:
echo 'apache_enable="YES"' >> /etc/rc.conf