Category: Life

  • discuz邮件设置

    站长->邮件设置->设置

    通过 SOCKET 连接 SMTP 服务器发送(支持 ESMTP 验证)

    SMTP 服务器

    ssl://smtp.gmail.com

    端口465

     
    同时,在Ucenter后台的邮件设置中进行同样的设置

  • apache开启gzip压缩和浏览器缓存功能

    http://witmax.cn/apache-deflate-expires.html

    1、开启gzip压缩

    开启gzip功能能大大降低网络传输的带宽,从而提高网页加载速度;一般对纯文本内容可压缩到原大小的40%。

    (1) 编辑Apache配置文件httpd.conf,查找下面这一行

    #LoadModule deflate_module modules/mod_deflate.so

    删除前面的#;如没有就查找LoadModule位置,加入上述行
    (2) 在httpd.conf末尾增加以下内容:

    <ifmodule mod_deflate.c>
    DeflateCompressionLevel 9
    AddOutputFilterByType DEFLATE text/html text/plain text/xml application/x-httpd-php
    AddOutputFilter DEFLATE css js
    </ifmodule>

    具体配置内容可参考mod_deflate模块手册。

    (3) 重启Apache服务

    2、开启浏览器缓存功能

    开启浏览器缓存后,在内容未过期前,浏览器不会重复从服务器提取数据文件,从而减少网页内容传输,提高网页打开速度。

    (1) 编辑Apache配置文件httpd.conf,查找下面这一行

    #LoadModule expires_module modules/mod_expires.so

    删除前面的#;如没有就查找LoadModule位置,加入上述行

    (2) 在httpd.conf末尾增加以下内容:

    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access plus 12 month"
    ExpiresByType text/html "access plus 12 months"
    ExpiresByType text/css "access plus 12 months"
    ExpiresByType image/gif "access plus 12 months"
    ExpiresByType image/jpeg "access plus 12 months"
    ExpiresByType image/jpg "access plus 12 months"
    ExpiresByType image/png "access plus 12 months"
    EXpiresByType application/x-shockwave-flash "access plus 12 months"
    EXpiresByType application/x-javascript "access plus 12 months"
    ExpiresByType video/x-flv "access plus 12 months"
    </IfModule>

    具体配置内容可参考mod_expires模块手册。

    (3) 重启Apache服务

  • apache/nginx某目录abc强制https访问

    apache

    把如下代码写一个.htaccess,丢到/abc/里面

    RewriteEngine on
    RewriteCond %{SERVER_PORT} !^443$
    RewriteRule ^(.*)?$ https://%{SERVER_NAME}/abc/$1 [L,R]

    nginx

    配置文件里写

    location /abc/ {
     if ( $scheme = 'http' ) {
     rewrite ^(.*)$ https://$host$1 permanent;
     }
    }
  • 大学生,四不像

    毕业一个多月了,怎么才能走出这种无耐

    发现自己做不了的事情太多太多了

    没有什么故事

  • 事情弄的差不多,毕业了

    大四这一年,起初上学期的享乐生活,一节课也没有

    后来找工作急急忙忙,找的差不多,后来又回校做毕业设计,答辩

    6月5号,班级聚餐

    6月6号,拍毕业照

    6月11号,求索聚餐

    6月14号,出发,去黄山,毕业旅行,15号,向上爬,晚上睡山上又下雨,16号下山回常州。

    6月22号,拿毕业证,从楼上扔东西,晚上一起逛了最后一次校园。

    6月23号,收拾东西,把他们没拿走的东西贪污掉,卖掉电风扇和被子,交宿舍钥匙,买票离别兄弟们,回南京。

    接下来清理电脑里面的和工作、生活无关的软件和文件

    各种用不到的vpn,宽带上网助手,网银插件,vs2008,sybase power desiner,会声会影。

    清理通讯录,办一张南京的手机号,银行卡,开始南京的生活

    graduate from cczu

  • httpd重启输入key的问题

    [root@sls-bb21p18 private]# openssl rsa < managed.name.key > managed.name.key.nopw
    Enter pass phrase:
    writing RSA key

    openssl rsa -in server.key -out server.key

    回到/etc/httpd/conf.d/ssl.conf,把证书改为managed.name.key.nopw就可以了