Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am just using the standard apache config file which mentions that it follows symlinks, but when I hit the url http://localhost/test it downloads the symlink file instead of following it. What config do I need to change to get apache to follow the symlink instead of downloading it?

This is an ls on the directory:

$ ls -al
total 10
drwx------+ 1 SYSTEM  SYSTEM  0 Oct 20 10:55 .
drwx------+ 1 SYSTEM  SYSTEM  0 Aug 26 12:27 ..
-rw-r--r--+ 1 me None   47 Oct 20 10:14 index.html
lrwxrwxrwx  1 me None   29 Oct 19 17:10 test -> /home/me/projects/test

This is in my apache config file:

<Directory "D:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
share|improve this question
    
Give more info on the system setup. Are you running Cygwin and pointing the symlink in question to an NTFS drive under Windows? What do you mean with "download the symlink" - what contents does the downloaded file contain? Is it a text file? –  Daniel Andersson Oct 20 '12 at 19:42
    
I remember Cygwin do store symlinks as plain text files, so they're only treated as symlinks if the binary is compiled with cygwin libraries. Where did you get your Apache? –  billc.cn Oct 20 '12 at 21:00

2 Answers 2

This could be down to permissions. First you need to figure out what user the apache server is running under. See this. On my server the user is apache.

Then run this from within your directory:

chgrp apache test/
chmod g+xr test/
share|improve this answer

There are no symbolic links in Windows. You may achieve the desired effect using mod alias.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.