I just did a google search for something & saw one of my sites modx error logs come up in the search results!
checked a few more sites and the same thing, checked more sites from the mods site gallery ... again - the same thing!
I can browse to anysite.com/core/cache/logs/error.log and view that sites error log!!!
How can we prevent this? Logs should not be world readable.
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525
-
☆ A M B ☆
- 1,780 Posts
I imagine this is precisely why there's an extensive section in the docs dedicated to hardening MODX with an advanced installation, and moving the core above the root.
Which is something I've never bothered with, I'm sure like many others. Makes you think, eh?
-
☆ A M B ☆
- 24,524 Posts
You definitely should have a robots.txt file, denying everything in the core, assets, connectors and manager folders. That will at least keep it out of the search engine results.
-
☆ A M B ☆
- 3,112 Posts
use .htaccess
btw, I prefer to use Advanced installation, where I can move the core folder out of the web root.
Since then, the world is not only unable to see the error log, but the whole component's files.
Rico
Genius is one percent inspiration and ninety-nine percent perspiration.
Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!
www.virtudraft.com
Security, security, security! |
Indonesian MODx Forum |
MODx Revo's cheatsheets |
MODx Evo's cheatsheets
Author of
Easy 2 Gallery 1.4.x,
PHPTidy,
spieFeed,
FileDownload R,
Upload To Users CMP,
Inherit Template TV,
LexRating,
ExerPlan,
Lingua,
virtuNewsletter,
Grid Class Key,
SmartTag,
prevNext
Maintainter/contributor of
Babel
Because it's hard to follow all topics on the forum, PING ME ON TWITTER
@_goldsky if you need my help.
Quote from: goldsky at Oct 09, 2012, 02:33 AMuse .htaccess
btw, I prefer to use Advanced installation, where I can move the core folder out of the web root.
Since then, the world is not only unable to see the error log, but the whole component's files.
what did you do in an .htaccess? a rewrite/redirect?
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525
-
MODX Staff
- 10,725 Posts
You can easily rename the ht.access in the core folder, which prevents direct access via the web server to any file in that location.
never noticed this file before... why wouldn't it be enabled by default? Seems to make more sense at first look.
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525
-
☆ A M B ☆
- 3,112 Posts
http://www.htaccess-guide.com/
is a good start to learn .htaccess.
there is also .htpasswd.
just google them.
you'll see.
btw, it's for Apache server.
IIS does different way.
[ed. note: goldsky last edited this post 14 years ago.]
Rico
Genius is one percent inspiration and ninety-nine percent perspiration.
Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!
www.virtudraft.com
Security, security, security! |
Indonesian MODx Forum |
MODx Revo's cheatsheets |
MODx Evo's cheatsheets
Author of
Easy 2 Gallery 1.4.x,
PHPTidy,
spieFeed,
FileDownload R,
Upload To Users CMP,
Inherit Template TV,
LexRating,
ExerPlan,
Lingua,
virtuNewsletter,
Grid Class Key,
SmartTag,
prevNext
Maintainter/contributor of
Babel
Because it's hard to follow all topics on the forum, PING ME ON TWITTER
@_goldsky if you need my help.
-
☆ A M B ☆
- 24,524 Posts
More and more hosts are using alternative webservers such as nginx (<cough> MODx Cloud <cough>), so default .htaccess files wouldn't be of much use there anyway.