Java method similar to nl2br in PHP
June 25th, 2009One Comment | Filed Under: Tutorials
Below Java method will work same as PHP function nl2br
return text.replaceAll("\n","<br />");
}
Directory index forbidden by Options directive
June 8th, 2009One Comment | Filed Under: Tutorials
I was going through error log and saw this error in error log file. To solve this problem, In /etc/httpd/conf.d you will see a file entitled welcome.conf
It looks like this:
<LocationMatch “^/+$”>
Options -Indexes
ErrorDocument 403 /error/noindex.html
</LocationMatch>
Change it to this:
<LocationMatch “^/+$”>
Options Indexes
ErrorDocument 403 /error/noindex.html
</LocationMatch>
Just remove the hyppen(-) before the Indexes, that’s it. I hope this will solve your problem.
Make sshd listen to a specific address
June 8th, 2009One Comment | Filed Under: Tutorials
In file /etc/ssh/sshd_config,
use
ListenAddress 192.168.0.1
to make sshd listen to only that address.