I would like to use .htaccess for different things like custom error pages and maybe for banning some IP's.
I have changed "AllowOverride None" to "AllowOverride All" in /etc/apache2/sites-enabled/bubba, and I have a .htaccess file in /home/web and a custom "error404.htm" page in folder: /home/web/errordocs. Why doesn't Apache pick it up?
/etc/apache2/httpd.conf has: "AccesFileName .htaccess"
How do I enable .htaccess on B3?
Please note the new address for this forum : forum.excito.org. The old address redirects here but I don't know for how long. Thanks !
New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !
using .htaccess files
Re: using .htaccess files
Have you restarted apache after you changed "AllowOverride"?
Re: using .htaccess files
I have restarted several times, what else could it be?
I want to use .htaccess to make a nice custom 404-error page with Troll Face and the word "problem?" for all those who are looking for phpMyAdmin on my server (I didn't install it, it seems to be a security risk)
I want to use .htaccess to make a nice custom 404-error page with Troll Face and the word "problem?" for all those who are looking for phpMyAdmin on my server (I didn't install it, it seems to be a security risk)
Re: using .htaccess files
try to see if your htaccess is read by apache by entering a typo in it and reloading apache. Then look in the error logs if apache complains.
As many directives in apache can be applied from different angles (location, virtualhost, directory) this is the quickest way to see if the htaccess is used
As many directives in apache can be applied from different angles (location, virtualhost, directory) this is the quickest way to see if the htaccess is used

Re: using .htaccess files
still no joy with .htaccess files, but I found out that custom error-pages are done with
/etc/apache2/conf.d/localized-error-pages. My custom 404-error page is now a really nice one!
OwnCloud uses .htaccess, so it would be good to know how to enable it. I don't know, maybe Apache rewrites the AllowOverride at reboot, mine was anyway back to "None" when I checked.
/etc/apache2/conf.d/localized-error-pages. My custom 404-error page is now a really nice one!
OwnCloud uses .htaccess, so it would be good to know how to enable it. I don't know, maybe Apache rewrites the AllowOverride at reboot, mine was anyway back to "None" when I checked.
Re: using .htaccess files
It most certainly does not do thattoukie wrote:I don't know, maybe Apache rewrites the AllowOverride at reboot, mine was anyway back to "None" when I checked.

Re: using .htaccess files
"It most certainly does not do that".
In that case it would be nice to know where those overruling directives are found.
In that case it would be nice to know where those overruling directives are found.
Re: using .htaccess files
Yeah I know, and if I would know I'd have told you. Searching for the winning rule can be a pain, and I cannot give you an easy answer except that there is no resetting done by apache at boot time.
Re: using .htaccess files
Apache says that you are not supposed to do things with .htaccess.
https://httpd.apache.org/docs/current/h ... ccess.html
"However, in general, use of .htaccess files should be avoided when possible. Any configuration that you would consider putting in a .htaccess file, can just as effectively be made in a <Directory> section in your main server configuration file."
OwnCloud uses .htaccess: "If you are running the apache webserver, it is recommended that you enable .htaccess files as ownCloud uses them to enhance security and allows you to use webfinger."
https://httpd.apache.org/docs/current/h ... ccess.html
"However, in general, use of .htaccess files should be avoided when possible. Any configuration that you would consider putting in a .htaccess file, can just as effectively be made in a <Directory> section in your main server configuration file."
OwnCloud uses .htaccess: "If you are running the apache webserver, it is recommended that you enable .htaccess files as ownCloud uses them to enhance security and allows you to use webfinger."
Re: using .htaccess files
Well of course, that would be because owncloud does not allow you access to their main server config. Allowing modifications via htaccess is the next best thing.
However, on the B3 you are the admin and you do have access to the main config. In that case, placing directives in the main config is preferred, not in the least because these directives are not processed after every http request.
However, on the B3 you are the admin and you do have access to the main config. In that case, placing directives in the main config is preferred, not in the least because these directives are not processed after every http request.