Koozali.org: home of the SME Server

Setting Apache to FollowSymLinks

Offline jfarschman

  • *
  • 406
  • +0/-0
Setting Apache to FollowSymLinks
« on: March 14, 2006, 05:29:21 PM »
Hi,

  I went to add FollowSymLinks into the templates and found that it would be done in 90-e-smithAccess40ibays for version 7 but there is a variable there that handles this

The file:
/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess40ibays

The variable:
$OUT .= "    Options +FollowSymLinks\n" if ($followSymLinks eq 'enabled');

More context:
Code: [Select]

        my $followSymLinks = $properties{'FollowSymLinks'} || "disabled";
        my $indexes = $properties{'Indexes'} || "enabled";
        $OUT .= "\n";
        $OUT .= "#------------------------------------------------------------\n";
        $OUT .= "# $key ibay directories ($properties{'Name'})\n";
        $OUT .= "#------------------------------------------------------------\n";

        $OUT .= "\n";
        $OUT .= "<Directory /home/e-smith/files/ibays/$key/html>\n";
        $OUT .= "    Options None\n";
        $OUT .= "    Options \n";
        $OUT .= "    Options +Indexes\n" if ($indexes eq 'enabled');
        $OUT .= "    Options +FollowSymLinks\n" if ($followSymLinks eq 'enabled');
        if ($dynamicContent eq 'enabled')
        {
            $OUT .= "    Options +Includes\n";
        }
        else
        {
            $OUT .= "    Options +IncludesNOEXEC\n";
            $OUT .= "    <FilesMatch \"\\.(php|php3|phtml)\$\">\n";
            $OUT .= "        order deny,allow\n";
            $OUT .= "        Deny from all\n";
            $OUT .= "    </FilesMatch>\n";
        }
        $OUT .= "    AllowOverride $allowOverride\n";
        $OUT .= "    order deny,allow\n";
        $OUT .= "    deny from all\n";
        $OUT .= "    allow from $allow\n";




How do I set $followSymLinks?  I could just put this file in templates-custom and change the line

my $followSymLinks = $properties{'FollowSymLinks'} || "disabled";

But is there a better way?
Jay Farschman
ICQ - 60448985
jay@hitechsavvy.com

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Setting Apache to FollowSymLinks
« Reply #1 on: March 14, 2006, 10:23:51 PM »
Not tested and not completely sure but I tjink it is a per ibay entry in the database:

Code: [Select]
db accounts setprop ibayname FollowSymLinks enabled

After you have done so you can check if modyfing the database entry went OK by

Code: [Select]
db accounts show ibayname

To reflect your changes in the configuration file you will have to expand the /etc/httpd/conf/httpd.conf file:

Code: [Select]
expand-template /etc/httpd/conf/httpd.conf

and last step is to restart yout httpd service for changes to take effect

Code: [Select]
/etc/rc7.d/S86httpd-e-smith sigusr1

Jonathan
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline jfarschman

  • *
  • 406
  • +0/-0
Setting Apache to FollowSymLinks
« Reply #2 on: March 15, 2006, 12:04:33 AM »
Thanks,

  It works great.  You can make it "NOT EXPERIMENTAL" if you want.  It worked great.
Jay Farschman
ICQ - 60448985
jay@hitechsavvy.com

Offline Tillebeck

  • ***
  • 76
  • +0/-0
SUPER !!!
« Reply #3 on: November 20, 2006, 05:04:29 PM »
Great!
I am up an running with the above information on  a fully updated SME 7.0 final. I had to get symlinks to be supported to make the Typo3 cms work

Offline ElFroggio

  • *
  • 262
  • +0/-0
Re: Setting Apache to FollowSymLinks
« Reply #4 on: July 27, 2009, 04:51:27 PM »
Code: [Select]
foto-biz.pm=ibay
    AllowOverride=All
    CgiBin=enabled
    FollowSymlinks=Enabled
    Gid=5007
    Group=shared
    Name=Foto-Biz -- PmWiki
    PasswordSet=no
    PublicAccess=global
    SymLinksIfOwnerMatch=Enabled
    Uid=5007
    UserAccess=wr-admin-rd-group

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
Re: Setting Apache to FollowSymLinks
« Reply #5 on: July 27, 2009, 07:54:18 PM »
Code: [Select]
foto-biz.pm=ibay
    AllowOverride=All
    CgiBin=enabled
    FollowSymlinks=Enabled
    Gid=5007
    Group=shared
    Name=Foto-Biz -- PmWiki
    PasswordSet=no
    PublicAccess=global
    SymLinksIfOwnerMatch=Enabled
    Uid=5007
    UserAccess=wr-admin-rd-group

Your settings are wrong. DB variables are case sensitive. See the warning box at:
http://wiki.contribs.org/DB_Variables_Configuration

enabled is not equal to Enabled

See for ibays specific settings:

http://wiki.contribs.org/DB_Variables_Configuration#Apache_server_ibay_specific_.28httpd-e-smith.29

If you want to use a .htaccess file under the ibay, you must configure AllowOverride to all also.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Setting Apache to FollowSymLinks
« Reply #6 on: July 27, 2009, 07:59:52 PM »
Code: [Select]
foto-biz.pm=ibay
    AllowOverride=All
    CgiBin=enabled
    FollowSymlinks=Enabled
    Gid=5007
    Group=shared
    Name=Foto-Biz -- PmWiki
    PasswordSet=no
    PublicAccess=global
    SymLinksIfOwnerMatch=Enabled
    Uid=5007
    UserAccess=wr-admin-rd-group
Next time try to post only in the relevant thread instead of like this in some older thread without any context.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)