Move your configuration files
TNG Config Path
TNG 7.0.0 added a Config Path in the Setup >> General Settings >> Paths and Folders
that allows you to move the following configuration files from the TNG install folder into a more protected area of your web site:
- templateconfig.php - added by TNG 8.1
- mmconfig.php - added by TNG 10.0.3
Only the above 7 files should be considered TNG configuration files. The first six are managed by the TNG Admin > Setup screen. The Mod Manager option file is managed by the Mod Manager options tab.
|TNG version:||≥ 12.0.0|
Other files with xxxconfig.php names pertain to customization for specific TNG charts and should remain in the TNG root folder.
|TNG version:||≥ 7.0|
TNG 7.0.0 allows you to specify a Config Path that is saved in the subroot.php (which remains in the TNG install folder) that points to where your configuration files are stored.
The reason you may want to move your TNG configuration files is that some of them contain parameters that would grant access to the capabilities on your site.
How to Move Config Files
If you decide to move your TNG configuration files, you should
- Decide where the new configuration folder will be (see examples below).
- Create that new configuration folder.
- In TNG, go to Admin >> Settings >> General Settings >> Paths and Folders
- Enter the full path to the configuration folder into the "Config Path" field.
- Your config path should be very similar to the "Root Path" that is specified immediately above "Config Path". See examples below.
- In your Control Panel, File Manager, select the config files listed above in the main TNG folder into the new folder
- Use the Move Selected button to move the selected TNG config files to your Config Path location
- You should move the files and not copy them to avoid confusion
- Run some TNG programs to make sure that TNG still uses the settings you expect.
- Make sure to save the pathname to your new config file folder in your TNG documentation.
- Assuming that you have a copy of your entire TNG site on your PC, copy the configuration files from the Config Path folder of that copy of TNG.
- Note that if you copy your web site from your host to your PC or in the other direction, 2 files should not be copied:
since they contain information specific to that web server environment, those two files should be created on your host or local computer webser so that your site will function correctly. If you copied those two files accidentally, you will need to edit them manually to recover your site.
Here is how to put your configuration files in the safe area above your shared site's document root in three easy steps:
- Use cPanel or FileZilla to create the config folder above the site's document root (public_html).
- Use TNG Admin > Setup > General Settings > Paths and Folders to point the Config Path to your new folder
- for example, Config Path: /home/mysite/config/
- Move the TNG configuration files shown above into the new folder.
- Save a copy of your subroot.php file in case you need to recover the Config Path
If you are hosted on ICDSoft for example, the config files could be moved to your /private folder which is not web accessible and can only be accessed through the ICDSoft Control Panel File Manager or through your FTP client.
You could create sub folders under /private to allow for having two or more test systems where you can then add a gedcom folder, for example the following was provided by Ron Krzmarzick
ICDSoft uses www for their web site root and private for files not accessible from the web browser. So under
|Note that you can simulate or test putting the folders outside of web browser accessibility on your local WampServer setup by creating the config folder as a subfolder to the wamp folder.|
backup your config path
If you decide to use the Config Path, make sure you make a backup copy of your subroot.php file after updating it.
You should document the value of your Config Path for recovery purposes by opening the subroot.php file and copying the value of the
$tngconfig[subroot] = "/home/yourdomain/private/www/config/";
as shown above for an ICDSoft hosted site and save it in your TNG customization instructions file, so you know what value you need to specify in order to recover the subroot.php.
The following provide additional security measures:
Controlling Site Access
- Permissions Explained
- Database User
- Move your configuration files
- Move your backup files
- Move your gedcom files
- Overlaid Subroot how to recover from subroot.php overlay
- Prevent Directory Listing
- Protecting access log