Why won't apache load a symlinked file from conf.d?

Posted by kdt on Server Fault See other posts from Server Fault or by kdt
Published on 2010-04-23T14:17:17Z Indexed on 2010/04/23 14:23 UTC
Read the original article Hit count: 295

Filed under:
|
|
|

I have an apache configuration file which works fine when it's placed directly in /etc/httpd/conf.d/foo.conf. However, when I move the same file somewhere else (for example, move it to /tmp/foo.conf) and then create a symlink with ln -s /tmp/foo.conf /etc/httpd/conf.d then apache fails on startup with:

httpd: could not open document config file /etc/httpd/conf.d/foo.conf

I've tried making the file and the symlink mode 777, and tried changing them to be owned by the apache user.

It seems like apache is failing to load the file purely on the basis of it being a symlink, but I'm sure I've used symlinks successfully on other machines. Is there something I'm missing? Does apache have an option for refusing to load config files if they're symlinks?

The operating system is CentOS 4.4, apache version 2.0.52.

© Server Fault or respective owner

Related posts about linux

Related posts about apache