Magento Forum

   
Move /var above webroot? 
 
nivekiam
Jr. Member
 
Total Posts:  30
Joined:  2007-11-28
 

Is it possible to move a directory like /var above the webroot so it would be impossible (well nearly impossible) to access that directory through the website?

Is it simply a matter of changing the file system setting for Var from {{var_dir}} to /usr/www/path/to/my/directory/var ?

Again, several other web apps I’ve used you can do this with so that cache/session data is out of the public’s prying eyes.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Hi, it is possible to move var up the directories, and this will be made more comfortable in future releases after introduction of packaging system.

Meanwhile, you can see that there’s /var/.htaccess that prevents web visitors from viewing contents of this directory. The same for every other non-web folder in Magento root.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top