If you have just installed a FreeBSD host with Apache and configured a Vhost document root to interpret PHP or Perl scripts and you end up with error in browser like:
HTTP 403 / client denied by server configuration error
or
Forbidden
You don't have permission to access /index.html on this server.
It is most likely due to improperly configured Apache directory or directories permissions. In Apache error log /var/log/httpd-error.log, there are plenty of error messages logged like:
[Tue Jan 15 13:09:39 2013] [error] [client 92.96.95.177] client denied by server configuration: /usr/home/hipo/public_html/management
[Tue Jan 15 13:09:41 2013] [error] [client 92.96.95.177] client denied by server configuration: /usr/home/hipo/public_html/management
[Tue Jan 15 13:09:41 2013] [error] [client 92.96.95.177] client denied by server configuration: /usr/home/hipo/public_html
[Tue Jan 15 13:09:41 2013] [error] [client 92.96.95.177] client denied by server configuration: /usr/home/hipo/public_html
[Tue Jan 15 13:09:41 2013] [error] [client 92.96.95.177] client denied by server configuration: /usr/home/hipo/public_html
[Tue Jan 15 13:09:41 2013] [error] [client 92.96.95.177] client denied by server configuration: /usr/home/hipo/public_html
The issue is caused by Apache <Directory> configuration which is restrictive and set to first deny and then apply allow rule, i.e.:
<Directory /usr/home/hipo/public_html>
Options ExecCGI -Indexes FollowSymLinks
Allowoverride All
Order Deny,allow
Deny from all
Allow from localhost
Allow from 123.123.123.123
</Directory>
To solve the problem change default Deny set policy (Deny from all) and first policy to be applied which is Deny to allow;
<Directory "/usr/home/hipo/public_html">
Options ExecCGI -Indexes FollowSymLinks
Allowoverride All
Order Allow,deny
Allow from all
#DirectoryIndex index.cgi
</Directory>
It is possible to not specify any Order Allow,deny (if there is no previous Apache <Directory> directive to override, so in many cases you can use;
<Directory "/usr/home/hipo/public_html">
Options ExecCGI -Indexes FollowSymLinks
Allowoverride All
Allow from all
#DirectoryIndex index.cgi
</Directory>
Finally restart Apache and all should be good;
freebsd# /usr/local/etc/rc.d/apache22 restart
....
Adding Comments & Google search plugins to nanoblogger
Thursday, July 30th, 2009Ever wondered how you can add comments option to nanoblogger just like any normal blogging software like wordpress do support? Cause I did, Today I wandered around in google a bit until I can make it.In order to make all this workable I choose the nbcom nanoblogger plugin.Here’s what led me to success.First prepare yourself to loose a couple of hours! It’s more complicated or at least it was more complicated than I expected to add a simple plugin as this.Second, You’ll need the following nbcom 1.1 archive .
Right after that you’ll need to untar it and rename hdrs.tmpl and consts.tmpl to *.php, edit them and remove all the unneeded “/†back slashes. Copy the content of nbcom-1.1 dir to the document root of your nanoblogger. Make sure to edit blog.conf and have all the necessary like BLOG_URL, BLOG_ADMIN=â€sessionâ€, DB_PASS=â€password_of_sql_user_sessionâ€, yes I forgot to mention that you’ll need to read the INSTALL file contained in the nbcom archive and follow the instructions for creation of user and database that nbcom would use in the future. There are described like 7+ files more you need to edit and if you’re lucky like I was you’ll have nanoblogger+comments support up and running! Hooray! Wish you Good luck.
Secondly probably you have wondered how to make nanoblogger has a normal search field just like any normal php based blogger software out there. It took me like an hour before I came to the enlightenment. First I had downloaded the google.sh script mirrored for you to make your life easier here .
Next copy the file to your nanoblogger plugins directory.
And last you have to edit the templates/main_index.htm file and add the content that is as commented in the google.sh file. If you’re lucky again you’ll have nanoblogger with this two valuable plugins working. EnjoyEND—–
Tags: Adding Comments Google, blogging, content, copy, document root, make, need, php, software, support
Posted in System Administration | 2 Comments »