Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: David_White on March 10, 2004, 05:51:45 AM
-
Hi All,
Can anyone tell me how to get a .htaccess file to work in Apache on SME5.5? I understand there is a contrib needed, but I can't find it anywhere.
Thanks in advance,
Dave
-
quick search on google provided:
Problem: You would like to have full .htaccess support, but SME doesn't give you this.
Solution: Login as root and perform the following commands to install files, expand the templates and restart apache
#Create the map /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf and change to there
[root@e-smith /root]# mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
[root@e-smith /root]# cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
#download and install tarbal containing template-files
[root@e-smith /root]# wget http://sme.nightspirit.nl/downloads/htaccess.tar.gz
[root@e-smith /root]# tar xzvf htaccess.tar.gz
[root@e-smith /root]# rm -f htaccess.tar.gz
#rebuild httpd.conf from template-files
[root@e-smith /root]# /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
#restart apache webserver
[root@e-smith /root]# /etc/init.d/httpd-e-smith restart
-
sme.nightspirit.nl seems to be down, tcheck this link :
http://www.tech-geeks.org/contrib/mdrone/
-
Thanks all,
I'll give it a try
D
-
Well, in one of the more dumbass moves in my life ( :pint: ), I followed the above instructions for SME5.6 to change my install of SME6.
It was all with good intent. I was trying to use .htaccess to secure the ibay that my database manager was in (you know, the phpmyadmin one) and I couldn't figure out how to secure it using the server-manager (I could set the ibay as entire internet (password) but then no password or logon I tried, and I tried 'em all, would then let me in). So, it worked......I could set .htaccess and secure the directories. Perfect.
Except, one of php programs uses an .htaccess file to perform a function I don't really understand, and now I can't get access to the directory at all (using a browser....I can still get in using WinSCP). I've got two versions of the program and neither of them now work. The .htaccess code is.....
===================================================
### STOP REFERRER SPAM
SetEnvIfNoCase Referer ".*(sex|hardcore|porn|pussy|xxx|webcam|ficken|fuck|boobs|babes).*" BadReferrer
order deny,allow
deny from env=BadReferrer
RewriteEngine on
RewriteRule ^(.*)$ wakka.php?wakka=$1 [QSA,L]
====================================================
I tried just removing the .htaccess file and the formatting was all goofed up when the program loaded. It's an educational site I'm developing for teens, so I really want things like a bad word filter (which I would guess is the function of the above){{Addendum: if I just comment out the last two lines it works, but with horrible formatting}}.
Any help would be appreciated (and please bear in mind I'm a server/linux newbie). Much thanks...
Mike Bowen, Lakehead Univ.
{{Addendum: I have checked the database here for info on "ReWriteEngine" and the one reference suggested adding
Options +FollowSymlinks
RewriteBase /
but that didn't work}}
ADDENDUM: Two days later. I found the template files that were the ones that "changed" the httpd.conf in a directory with custom templates. I copied the original versions of the e-smith templates there and then re-did the command (as per above) that rebuilt the httpd.conf file from the custom templates. I would guess that this removed the changes cuz I lost the .htaccess problem and everything returned to as before (except, weirdly, I still can't log in from outside the network using WinSCP without using a VPN which I could do before). Anyhow, the rewriteengine problem is now gone.....