要安装WP Super Cache,

需要mod_rewrite, mod_header, mod_expires.

<VirtualHost *:80>

ServerAdmin wangtianming@abc.com
ServerName abc.com
ServerAlias www.abc.com
DocumentRoot /srv/www/abc/public_html
<Directory "/srv/www/abc/public_html">
AllowOverride All
</Directory>
ErrorLog /srv/www/abc/logs/error.log
CustomLog /srv/www/abc/logs/access.log combined
</VirtualHost>

 

参考了一这篇文章:http://www.myhack58.com/Article/sort099/sort0102/2011/29328.htm

在wordpress中,在作了上述修改后,wordpress会在你选择了“设置/固定链接"中的非默认项后自动在你的网站目录下创建.htaccess文件。

 

另外的两个模块 mod_header, mod_expires.

用上面的ln命令安装这两个模块后,就可以用了。可能是WP Super Cache已经把他俩给配置了。

现在速度明显快多了。

ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load

相关文章:

  • 2021-06-29
  • 2022-12-23
  • 2022-02-13
  • 2021-07-05
  • 2021-08-23
  • 2021-05-14
  • 2021-10-11
  • 2022-12-23
猜你喜欢
  • 2021-07-17
  • 2022-12-23
  • 2021-09-27
  • 2021-12-17
  • 2021-07-25
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案