文章分类 -  Lamp

摘要:/usr/local/mysql/bin/mysql已经配置了环境变量 默认没有给mysql设置密码 设置密码mysqladmin 密码重置 1. 编辑mysql主配置文件 my.cnfvim /etc/my.cnf 在[mysqld]字段下添加参数 skip-grant 2. 重启数据库服务ser 阅读全文
posted @ 2015-09-15 15:08 沐风先生 阅读(159) 评论(0) 推荐(0)
摘要:版本:Server version: 5.1.40 MySQL Community Server (GPL) 配置文件 # Example MySQL config file for large systems. # # This is for a large system with memory 阅读全文
posted @ 2015-09-14 23:09 沐风先生 阅读(261) 评论(0) 推荐(0)
摘要:查看已加载的模块 如果模块没有加载进来,则重新编译php或动态加载 /usr/local/php/bin/php -m #发现curl未加载 很多模块远在php的ext目录里,没有就去下载,这里有curl模块 查看有没有编译curl模块,发现未编译 cd curl /usr/local/php/bi 阅读全文
posted @ 2015-09-14 15:36 沐风先生 阅读(155) 评论(0) 推荐(0)
摘要:在rewrite.c模块内添加 cd /data/www/data mkdir tmp vim 1.html RewriteCond %{REQUEST_URI} ^.*/tmp.* [NC] RewriteRule .* - [F] 阅读全文
posted @ 2015-09-14 00:07 沐风先生 阅读(231) 评论(0) 推荐(0)
摘要:禁止/data/www/data目录下的php文件解析 php_admin_flag engine off不解析php文件,但仍然会下载禁止下载 php_admin_flag engine off Order Deny,all... 阅读全文
posted @ 2015-09-13 23:45 沐风先生 阅读(137) 评论(0) 推荐(0)
摘要:避免图片等被盗用 vim /usr/local/apache2/conf/extra/httpd-vhosts.conf 添加 SetEnvIfNoCase Referer "^http://.*\.hy\.com" local_ref SetEnvIfNoCase Referer ".*\.wul 阅读全文
posted @ 2015-09-12 23:20 沐风先生 阅读(177) 评论(0) 推荐(0)
摘要:限制IP访问目录 Options None AllowOverride None Order allow,deny Allow from all Deny from 127.0.0.1 限制IP访问文件 Order deny,allow ... 阅读全文
posted @ 2015-09-12 21:09 沐风先生 阅读(141) 评论(0) 推荐(0)
摘要:方法一:使用 rotatelogs vim /usr/local/apache2/conf/extra/httpd-vhosts.conf 在对应的虚拟主机配置文件中加入(配置日志) 每天切割一次日志( 说明:86400单位为秒,按小时用3600) ErrorLog "logs/hyit.com-e 阅读全文
posted @ 2015-09-08 22:34 沐风先生 阅读(171) 评论(0) 推荐(0)
摘要:子目录的权限会继承父目录,但是子目录可以重新配置自己的权限,父目录下的文件也如此。 网站目录的o用户有r权限,但不能直接列出目录下的文件列表,如果权限允许却可以按照路径查看文件内容 1.配置虚拟主机 vim /usr/local/apache2/conf/extra/httpd-vhosts.con 阅读全文
posted @ 2015-09-06 15:52 沐风先生 阅读(179) 评论(0) 推荐(0)
摘要:官网: http://download.comsenz.com/DiscuzX/3.2/ wget http://download.comsenz.com/DiscuzX/3.2/Discuz_X3.2_SC_GBK.zip mkdir /discuzmv Discuz_X3.2_SC_GB6K.z 阅读全文
posted @ 2015-09-05 23:13 沐风先生 阅读(252) 评论(0) 推荐(0)
摘要:安装php时,需要指定mysql安装目录,也需要指定apache的apxs工具,安装顺序可以是amp、map 另外需要注意的是:php是apache的一个模块 apache、mysql各需要一个用户监听 相关资料: http://www.apelearn.com/study_v2/download. 阅读全文
posted @ 2015-09-02 09:40 沐风先生 阅读(360) 评论(0) 推荐(0)