Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: jfarschman on March 14, 2006, 05:29:21 PM

Title: Setting Apache to FollowSymLinks
Post by: jfarschman 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?
Title: Setting Apache to FollowSymLinks
Post by: cactus 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
Title: Setting Apache to FollowSymLinks
Post by: jfarschman on March 15, 2006, 12:04:33 AM
Thanks,

  It works great.  You can make it "NOT EXPERIMENTAL" if you want.  It worked great.
Title: SUPER !!!
Post by: Tillebeck 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
Title: Re: Setting Apache to FollowSymLinks
Post by: ElFroggio 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
Title: Re: Setting Apache to FollowSymLinks
Post by: Normando 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.
Title: Re: Setting Apache to FollowSymLinks
Post by: cactus 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.