Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: jhale1966 on July 11, 2006, 02:19:17 AM
-
I've been searching through the forums about adding .htaccess to some folders I have but all the messages seem to be for pre-final versions of the server.
Does anyone have a HOW-TO for the final?
Thanks! :-D
-
jhale1966
I would imagine that the answers for recent RC releases would be the same as for the final release.
See this howto which has been reported to work on sme7
http://mirror.contribs.org/smeserver//contribs/rmitchell/smeserver/howto/htaccess%20configuration%20with%20custom%20templates%20HOWTO%20for%20sme%20server.htm
-
That's the thing - I've been reading where there are issues with e-smith-htaccess-1.1-2.noarch.rpm being installed. Do I still need this if I use the next part of that HOWTO?
-
jhale1966
That's the whole point of the howto. No.
-
Excellent!
I'll give that a shot later this week. Thanks! :-)
-
/sbin/e-smith/db accounts setprop ibayname AllowOverride All
/sbin/e-smith/signal-event ibay-modify ibayname
-
Just for thoes who care
a quick fix for the warning in e-smith-htaccess-1.1-2.noarch.rpm (http://mirror.contribs.org/smeserver/contribs/nightspirit/e-smith-htaccess/e-smith-htaccess-1.1-2.noarch.rpm)
nano /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/90e-smithAccess40ibays
change
tie %accounts, 'esmith::config', '/home/e-smith/accounts';
to
tie %accounts, 'esmith::config', '/home/e-smith/db/accounts';
Save and close
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
/etc/init.d/httpd reload
P.s Ray you may wish to add this to the howto for the rpm Part
-
Just out of curiousity - is the rpm even required in 7.0
-
if you create custom templates for each folder requiring htacess then no
if you want htacces on all web folders yes
-
if you create custom templates for each folder requiring htacess then no
if you want htacces on all web folders yes
Sorry - not sure I understand. I just put a .htaccess file in whichever folder I need it in and thats it.
-
For easy use use the rpm
if you do not use the rpm you have to start creating custom templates like in the howto Above.
for an easy install
do this
wget http://mirror.contribs.org/smeserver/contribs/nightspirit/e-smith-htaccess/e-smith-htaccess-1.1-2.noarch.rpm
rpm -Uvh e-smith-htaccess-1.1-2.noarch.rpm
nano /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/90e-smithAccess40ibays
find on line 7
tie %accounts, 'esmith::config', '/home/e-smith/accounts';
change to
tie %accounts, 'esmith::config', '/home/e-smith/db/accounts';
Save and close
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
/etc/init.d/httpd reload
then put the .htaccess files wherever you wish to use them
-
duncan
>..not sure I understand. I just put a .htaccess file in whichever folder I need it in and thats it.
The reason for NOT using .htacess files and the rpm is outlined in the howto, to quote:
.htaccess files are inherently exposed to the Internet and require the correct permissions to be applied to ensure that unauthorised access is not allowed, therefore creating a security risk.
The better way to implement .htaccess in sme server is to use custom templates, which are only under the control of the administrator and cannot be tampered with by anonymous Internet users. Using this method you do NOT need to install the abovementioned rpm.
-
duncan
>..not sure I understand. I just put a .htaccess file in whichever folder I need it in and thats it.
The reason for NOT using .htacess files and the rpm is outlined in the howto, to quote:
.htaccess files are inherently exposed to the Internet and require the correct permissions to be applied to ensure that unauthorised access is not allowed, therefore creating a security risk.
The better way to implement .htaccess in sme server is to use custom templates, which are only under the control of the administrator and cannot be tampered with by anonymous Internet users. Using this method you do NOT need to install the abovementioned rpm.
That may be the case - however how does that handle multiple occurrences of .htaccess in the top level web folder and folders below. Or should I say how do you handle templating within lower level folders.
I find it easier to do
/sbin/e-smith/db accounts setprop ibayname AllowOverride All
/sbin/e-smith/signal-event ibay-modify ibayname
and make sure .htaccess protected correctly. It supposedly slows the particular site down - but I would think it marginal.
-
duncan
> ...how do you handle templating within lower level folders.
I'm far from an expert on the subject, but I assume the answer is to use multiple custom template fragments.
> I find it easier to do...
Easier but less secure.
-
I'm far from an expert on the subject, but I assume the answer is to use multiple custom template fragments.
Be a bit messy I should think.
Regardless - my question was if the rpm was needed in version 7.0. I dont see the need for it as htaccess will work using the method I have outlined above.
-
To all
This thread is of interest as it uses the htaccess custom template differently, which is the general concept anyway ie make the custom template reflect what you would put in a normal .htaccess file.
http://forums.contribs.org/index.php?topic=32078.0