Open Source
Menu
Log-in
Tags Cloud
Latest Comments
*****More Explanation You Can Add Or Edit This Lin...
02.02.12 14:30
Thank You... :lol:
06.01.12 05:05
THANK YOU...!!!! it's working to me...
17.12.11 01:46
Hey, thanks a lot. :D :lol:
09.12.11 17:49
YES!! It works great. I'm happy
01.12.11 14:05
Move the configuration files outside of public_html |
|
|
|
| Tuesday, 21 July 2009 21:55 |
|
One of the most important security measures in Joomla! is ensuring that certain PHP files in public_html containing executable code or confidential data are protected from direct Internet access. There are various ways to protect such files, including modifying the htaccess file. Many users and developer groups strongly recommend NOT to keep vulnerable files and confidential data inside public_html. The following method seems to be the simplest and most elegant way to protect read-only files that for whatever reason must be stored in public_html. In this example, we protect configuration.php, perhaps the most confidential file of any Joomla! site. <?php require( dirname( __FILE__ ) . '/../joomla.conf' ); ?> Do not include blank lines above the php start tag "". Such blank lines will trigger the infamous "headers already sent" error. e.g.: Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxx/public_html/configuration.php:2) in /home/xxxxx/public_html/index.php on line 250 3. Make sure this new configuration.php is not writable at all, so that it can not be overridden by com_config. 4. If you need to change configuration settings, do it manually in the relocated joomla.conf.
Alternatively you can relocate the configuration file to another sub-folder inside the public directory and then secure this sub-folder from unauthorized access using .htaccess file.
Note: Using this method, even if the Web server somehow delivers the contents of PHP files, for example due to a misconfiguration, nobody can see the contents of the real configuration file. |



