使用rewrite重定向http到https

Apache httpd

RewriteEngine On
# RewriteCond %{SERVER_NAME} =www.example.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301,NE,QSA]

如Server绑定多个域名,需要针对实际请求的主机名重定向,可以把%{SERVER_NAME}替换成%{HTTP_HOST}

Nginx

rewrite ^ https://$host$request_uri permanent;

也可以直接使用return语句

return 301 https://$host$request_uri;

[转]删除mysql binary log的方法

  1. 查看当前日志记录
mysql> show binary logs;
+—————-+———–+
| Log_name | File_size |
+—————-+———–+
| mysql-bin.000001 | 150462942 |
| mysql-bin.000002 | 125 |
| mysql-bin.000003 | 106 |
+—————-+———–+
  1. 删除bin-log(删除mysql-bin.000003之前的而没有包含mysql-bin.000003)
mysql> purge binary logs to ‘mysql-bin.000003′;
Query OK, 0 rows affected (0.16 sec)

Windows下APM(Apache+Php+Mysql)程序包开发商

AppServ
http://www.appservnetwork.com/

PhpNow(国产)
http://phpnow.org/

UniformServer(更新最积极)
http://www.uniformserver.com/

WampServer(目前唯一发现提供64位版的,桌面管理功能最全)
http://www.wampserver.com/

XAMPP
http://www.apachefriends.org/zh_cn/xampp.html