Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: Gman on December 30, 2002, 05:51:51 AM
-
I am trying to implement the .htaccess on my E-Sever (5.5 with updates) and I have a question ? Has anyone tried the following on a 5.5 server ? If so, was it successful ?
http://sme.nightspirit.nl/howto/?id=1 (His site states it is for verson 5.1.2)
However, I have looked at the files from his site that I have downloaded, and it states for version 3 or 4 of e-smith server. (Look at file name "90e-smithAccess40ibays")
My main reason for doing this is I want to stop directory browsing. Is there an easier way of doing this without the .htaccess ?
Thanks,
G
-
Isn't that an option in the /etc/httpd/conf/httpd.conf file?
If so, just locate where it is set through the the template system (/etc/e-smith/templates/etc/httpd/conf/httpd.conf/*) Then copy the appropriate fragment to /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/FILENAME, make your changes in the copy then expand the template and restart apache.
Expand template:
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
Restart Apache:
/etc/rc.d/init.d/apache restart
that make sense?
-
That's what I thought also, however when I did that, nothing changed. Now I may have not included everything as I am new to the template business, however this is what I did.
Created a file in the custom template area in the correct spot.
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
pico /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/88AllowOverride
#Added this to the new file called "88AllowOverride"#
Options None
AllowOverride All
Then expanded the template:
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
Then restarted the httpd server:
/etc/rc.d/init.d/httpd restart
However, I could never get it to work. Everytime I went to the web server, I could still perform directory browsing. I looked in the httpd.conf file and found where it added the text I created. But still it did not work. The options "None" is what is suppose to stop the directory browsing. I then added the AllowOverride "All" to try and have the .htaccess file do it for me. But still no luck.
Also, I am wanting to know how do I remove the custom templete from the server. Just remove the template and then what ?
Thanks,
G
-
To remove the custom template, just remove the file and directory if it's empty, then re-expand the template and restart apache. Just like you did above.
I'll look a little closer and see what if I can turn it off.
Let me know if you figure it out, before I do.
Thanks,
Abe
-
I discovered a simple fix when I had the same problem. You can just put a blank index.html file in the directory. It will be displayed instead of the directory listing.
-
Any update to this? I am running 5.6 and would also like to disable directory browsing.