[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

moving config file out of public html file in joomla

Posted on 2009-12-21
8
Medium Priority
?
1,045 Views
Last Modified: 2013-12-12
Below are instructions to move the configeration.php file out of the public_html folder. The code they use show how to move the configuration one folder up.

I have my joomla installation in a joomla folder inside the public html folder. Therefore, I have to move two folders up. What is the code I need to add to the two designated spots to do that? I want the file in a folder called "security".

Step 1 :  Move configuration.php to a safe directory outside of public_html.

Step 2: You will have to modify the /includes/defines.php and /administrator/includes/defines.php files, more precisely, this constant:
define( 'JPATH_CONFIGURATION', JPATH_ROOT );

If, for example you wish to move the file up one level and into a folder named "test" the constant will look like this:
define( 'JPATH_CONFIGURATION', JPATH_ROOT.DS.'..'.DS.'test' );

Step 3: Make sure the configuration.php is not writable at all, so that it can not be overridden by com_config.

Step 4: If you need to change configuration settings, do it manually in the relocated configuration.php
0
Comment
Question by:wingcat
8 Comments
 
LVL 8

Expert Comment

by:Jesse Matlock
ID: 26103348
why would you want to go through this trouble. On a secure server there is very little, if any chance (unless vulnerability already exists in the code) to compromise your site.
0
 
LVL 3

Expert Comment

by:uma_
ID: 26103388
So what is ur goal ? WHy u are moving the config file?

Anyway it is advisable to take a backup of ur site daily using cron ,if u concern abt the viruses.


For ur question ,please check this threads

http://forum.joomla.org/viewtopic.php?f=432&t=222717

http://www.hostmonsterforum.com/showthread.php?t=2109


0
 
LVL 3

Expert Comment

by:Praveen Valluri
ID: 26103817
moving confgiuration file will not  let your joomla to work any more
you can rename the joomla folder and change it inside your configuration.php file.
Then you copy the contents of your security folder here
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:wingcat
ID: 26106309
The reason I want to move it is because I recently installed RS Firewall and it's one items on a list that enhances the security of the site. They also suggest moving the log and temporary folders to a 'security' folder outside of the public html and redirecting it in joomla/global configuration.

Or is this not such a big deal?

0
 
LVL 8

Accepted Solution

by:
Jesse Matlock earned 2000 total points
ID: 26106384
If you have any type of reasonable security on your hosting platform, this is unnecessary. We use high end VPS servers with excellent security and never have a problem running dozens of joomla sites. Even with going to these extreme efforts, if you lapse updating when a security fix comes out.. you're just as vulnerable.

So, my recommendation - ensure your server is a secured platform. Stay on top of Joomla updates.

I personally get alerted to security breaches on our servers and there are dozens of attempts every single day.. sometimes hundreds. Not only does the configuration of our server ensure they 'don't get in' we also add repeating IPs to a blacklist.

Who do you host with currently?
0
 

Author Comment

by:wingcat
ID: 26106450
1and1.com
0
 

Author Comment

by:wingcat
ID: 26106474
I am just using normal linux hosting. That is why this may be a concern for me.
0
 
LVL 8

Expert Comment

by:Jesse Matlock
ID: 26106547
Check into Liquid Web. We have used everyone from the cheap (bluehost) to the expensive (rackspace, mosso, etc) and have found Liquid Webs VPS the best value and most secure of them all. Hands down. And most importantly, their support is excellent. They also offer less expensive hosting than the VPS offerings, but on similar servers.

Check them out here:
http://www.lunarpages.com/id/best2
(this is my referral link, if you like them, get back to me and I will find a coupon code for you as well)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question