Shammer's Philosophy

My private adversaria

Access Hunchentoot via mod_proxy

Hunchentoot document introduce how to access Hunchentoot behind a proxy. I tested this by Apache proxy.

Mac OS X apache configuration files are based on /etc/apache2/httpd.conf.
This file includes content from /etc/apache2/other/*, the following line means this point.

<IfDefine !MACOSXSERVER>
    Include /etc/apache2/other/*.conf
</IfDefine>

Creating /etc/apache2/other/proxy.conf, apache recognizes this file. So it is clear to equal the name of enable module and it's configuration file such as /etc/apache2/other/$MODULE_NAME.conf. I generated /etc/apache2/other/proxy.conf and it's contents is below.

<IfModule mod_proxy.c>
ProxyRequests Off

  <Proxy *>
    Order deny,allow
    Allow from all
  </Proxy>

ProxyPass /lisp http://localhost:4242/
ProxyPassReverse /lisp http://localhost:4242/
</IfModule>

After creating this file, restart apache. Restarting apache is by System Configuration, "共有". Uncheck "Web 共有", check "Web 共有" means restart. I have no idea how to restart apache by command. There is no /etc/init.d/ directory and service command. Mac is not Linux, this is not strange.