linux服务器下PHPCMS v9 安全配置详解


当前第2页 返回上一页

通过目录下面放置 .htaccess文件来限制权限。
RewriteEngine on
RewriteRule ^(.*) /index.html
使用场景:
\caches\
\phpsso_server\caches\

3、禁止php跨目录浏览权限配置:

虚拟主机配置样例:

代码如下:

<VirtualHost *:80>
ServerAdmin root@phpip.com
DocumentRoot /data/wwwroot/www
ServerName www.phpip.com
<Directory /data/wwwroot/www>
Options FollowSymLinks
AllowOverride Options FileInfo
Order allow,deny
Allow from all
php_admin_value open_basedir /data/wwwroot/www/:/var/tmp/
DirectoryIndex index.htm index.html index.php
</Directory>
ErrorLog "| /usr/sbin/rotatelogs /data/logs/%m_%d_www.phpip.com-error_log 86400 480"
CustomLog "| /usr/sbin/rotatelogs /data/logs/%m_%d_www.phpip.com-access_log 86400 480" common
</VirtualHost>

4、按天存放apache日志:

参考上面配置文件:

打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...