[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path Zen Cart 源代码 important_site_security_recommendations.html
<h1>6. 保护"自定义页面" "html_includes"中的内容 </h1>
<p>定义好您的<strong>自定义页面</strong>后,(管理页面->工具->页面编辑), 您要保护这些文件:</p>
<p> A. 用FTP软件下载备份,这些文件位于<span class="filename">/includes/languages/english/html_includes</span>目录。</p>
<p>B. 修改文件 CHMOD 644 或 444 (或 Windows下为“只读”)。见上面的CHMOD说明<br>
<span class="filename">/includes/languages/schinese/html_includes</span> – 下面的所有文件/目录
<br />
<span class="error">提示: 设置为只读后,如果需要修改自定义页面,还需要重设为可读写。</span></p>
<h1>7. 使用.htaccess文件来强化安全</h1>
<p>在服务器目录里,<span class="filename">.htaccess</span>文件可用于防止用户浏览目录,还可以防止直接访问"任何".PHP脚本,因为某些目录中的所有PHP文件是通过其它PHP文件访问,而不是直接通过浏览器。这有利于安全。<br />
<p>某些目录下还有一些半-"空白"的<span class="filename">index.html</span>文件,这些文件用于保护目录,万一FTP软件不能上传.htaccess文件,或您的服务器不接受,可以防止目录浏览,但不会停止执行.PHP文件。<br />这也是"可行的"方法,尽管在所有目录下使用<span class="filename">.htaccess</span>文件更好。</p>
<p>目录中存在<span class="filename">index.html</span> 文件,<span class="error">但还没有</span><span class="filename">.htaccess</span>文件时,建议添加的<span class="filename">.htaccess</span>文件如下(取决于服务器的设置):<br />
<div class="callout">
<p><span class="filename">#.htaccess 用于保护文件 <br />
OPTIONS -Indexes -ExecCGI<br>
IndexIgnore */*<br>
### 先限制所有访问。然后,允许访问特定项目,见下面的 FilesMatch 部分.<br>
<FilesMatch .*><br>
Order Deny,Allow<br>
Deny from all<br>
</FilesMatch><br>
### 说明: 仅在列表中增加允许的文件类型,取决于要保护的目录:<br>
<FilesMatch .*\.(js|css|jpg|gif|png|swf)><br>
Order Deny,Allow<br>
Allow from all<br>
</FilesMatch><br>
</span><br>
</p>
</div>
<p>In order for the above suggestions to work, your host must include either 'All' or all of these: 'Limit Options Indexes' parameters to the AllowOverride configuration in the server's apache/conf/httpd.conf file.<br />Some hosts don't like to let you use the OPTIONS directive, so you'll need to leave that line out or put a # in front of it.</p>
<p>如果您的主机不允许您建立/使用自己的<span class="filename">.htaccess</span>文件,有时您可以通过管理面板来设置<span class="filename">.htaccess</span>文件。</p>
<p><span class="error">您需要选择 -- 并使用 -- 适合您的服务器的方法</span>。最好咨询您的主机提供商。</p>
<h1>关闭"允许访客推荐给朋友"功能</h1>
管理页面->电子邮件选项->允许访客推荐给朋友选项设置为'false'。防止用户利用你的服务器发送不必要的电子邮件。<br />
<h1>Protect your "images" and other folders </h1>
During initial installation, you are advised to set your images folder to read/write, so that you can use the Admin interface to upload product/category images without having to use FTP for each one. Similar recommendations are made to other files for various reasons. <br>
<br>
However, leaving the images (or any other) folder in read/write mode means that hackers might be able to put malicious files in this (or other) folder(s) and thus create access points from which to attempt nasty exploits. <br>
<br>
Thus, once your site is built and your images have been created/loaded, you should drop the security down from read/write to read. ie: change from CHMOD 777 down to 644 for files, and to 755 for folders. <br>
<br>
<h4>File/Folder permissions settings</h4>
<p>On Linux/Unix hosts, generally, permission-setting recommendations for basic security are: </p>
<ul>
<li>folders/directories: 755 </li>
<li>files: 644 </li>
</ul>
<p>On Windows hosts, setting files read-only is usually sufficient. Should double-check that the <em>Internet Guest Account</em> has limited (read-only) access. </p>
<h4>Folder Purposes</h4>
<p>The folders for which installation suggests read-write access for setup are these. If your site supports .htaccess protection, then you should use it for these folders. (The .htaccess files included with v1.3.9 and newer should already cover the basics.) </p>
<ul>
<li><span class="filename">/cache</span><br>
This is used to cache session and database information. The BEST security protection for this is to move it to a folder "above" the webroot (public_html or htdocs or www) area, so that it's not accessible via a browser. (Requires changes to DIR_FS_SQL_CACHE setting in configure.php files as well as Admin > Configuration > Sessions > Session Directory.)</li>
<li><span class="filename">/images</span><br>
See other suggestions earlier. </li>
<li><span class="filename">/includes/languages/english/html_includes</span><br>
See other suggestions earlier. </li>
<li><span class="filename">/media</span><br>
This is only suggested read-write for the sake of being able to upload music-product media files via the admin. Could be done by FTP as an alternative. </li>
<li><span class="filename">/pub</span><br>
This is used on Linux/Unix hosts to have downloadable products made available to customers via a secure delivery method which doesn't disclose the 'real' location of files/data on your server (so that people can't share a URL and have their friends steal downloads from your site) </li>
<li><span class="filename">/admin/backups</span><br>
This is used by automated backup routines to store database backups. Optional. </li>
<li><span class="filename">/admin/images/graphs</span><br>
This is used by the Admin > Tools > Banner Manager for updating/displaying bar graphs related to banner usage. If not writable, feature is ignored. <br />
</li>
</ul>
<h1>Remove the print URL from your browser's headers </h1>
<p>To stop the browser from printing a URL on the invoice or any other document on the web, follow these steps:</p>
<p> For Internet Explorer:<br>
o Click on File then Page Setup <br>
o At page setup, remove this two character combination: "&u" from the header or footer text box. </p>
<p>For Firefox:<br>
o Click on <em>File</em> then <em>Page Setup<br>
o </em>On page setup window click on the tab "Margins & Header/Footer". In the "Header & Footer" section set all of the drop downs to --blank--. (Or at least remove all references to "Title" and "URL".)</p>
<h1>Things to Check Up on Regularly</h1>
<ol><li>Be sure you've done all the steps listed in this document
<li>Keep good backups of your website files and database
<li>Check your server's errorlog regularly for odd or suspicious activity<ul>
<li>look for any links that went to a page that isn't in your site
<li>look for links that have http after the index.php </li></ul>
<li>Check your website files regularly to be sure nothing's been added or altered
<li>Ask your webhost what they have done to be sure the server you're on is safe and secure so that outsiders cannot do any harm, and so that other websites on your server cannot be used to get to your site and cause any harm (in case they have security holes in them)
<li>If your business warrants, or you still want additional assurance (esp if running forum software on your site, or other scripts outside of Zen Cart), hire a security consultant to check your site regularly and give you peace of mind in exchange for a few dollars </li>
</ol><br />
</td>
</tr>
</table>
<div align="center"><br />
<em>版权所有 2010 Zen Cart 中文版</em> <br />
<br />
<br />
</div>
</body>
</html>