<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Nginx on 空想枫</title>
    <link>http://it580.com/tags/nginx/</link>
    <description>Recent content in Nginx on 空想枫</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <copyright>&amp;copy; 2001-2020 空想枫</copyright>
    <lastBuildDate>Sat, 04 Jun 2011 12:57:29 +0000</lastBuildDate>
    
	<atom:link href="http://it580.com/tags/nginx/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>nginx&#43;PHP的多域名配置</title>
      <link>http://it580.com/nginxphp-e7-9a-84-e5-a4-9a-e5-9f-9f-e5-90-8d-e9-85-8d-e7-bd-ae/</link>
      <pubDate>Sat, 04 Jun 2011 12:57:29 +0000</pubDate>
      
      <guid>http://it580.com/nginxphp-e7-9a-84-e5-a4-9a-e5-9f-9f-e5-90-8d-e9-85-8d-e7-bd-ae/</guid>
      <description>有朋友问如何配置nginx,支持多个域名。就有了这篇文章。
如何安装nginx+php见这里:http://blog.it580.com/nginx-php-fpm-mysql%E5%AE%89%E8%A3%85debian-squeeze-vps
1.新建配置文件
 nano /etc/nginx/sites-available/test.com
 2.配置内容
该配置为配置支持test.com
访问日志为/var/log/nginx/test.com.access.log
错误日志为/var/log/nginx/test.com.error.log
网站主目录为/var/www/test(注意php解析部分也要修改)
如果不是部署wordpress，删除wordpress rewrite start 到 wordpress rewrite stop的内容。
 server
{
server_name .test.com;
access_log /var/log/nginx/test.com.access.log;
error_log /var/log/nginx/test.com.error.log;
root /var/www/test;
index index.php index.html index.htm;
#wordpress rewrite start
#
# unless the request is for a valid file, send to bootstrap
if (!-e $request_filename)
{
rewrite ^(.+)$ /index.php?q=$1 last;
}
# catch all
error_page 404 /index.php;
 #
#wordress rewrite stop</description>
    </item>
    
    <item>
      <title>nginx &#43; php-fpm &#43;mysql安装(Debian Squeeze VPS)</title>
      <link>http://it580.com/nginx-php-fpm-mysql-e5-ae-89-e8-a3-85debian-squeeze-vps/</link>
      <pubDate>Wed, 11 May 2011 11:58:40 +0000</pubDate>
      
      <guid>http://it580.com/nginx-php-fpm-mysql-e5-ae-89-e8-a3-85debian-squeeze-vps/</guid>
      <description>1.在原有源的基础上加入新的源 2.增加新加源的证书 3.更新源数据 4.安装软件 5.MySQL 安全配置 6.取消MySQL innodb支持 7.打开nginx PHP支持 8.启动PHP-FPM服务 9.验证安装是否成功 10.Done        nginx: http://www.nginx.org php-fpm: http://php-fpm.org mysql : http://dev.mysql.com apt source : http://www.dotdeb.org
1.在原有源的基础上加入新的源 执行命令:
 nano /etc/apt/source.list
 在文件底部加入如下内容:
 deb http://packages.dotdeb.org stable all deb-src http://packages.dotdeb.org stable all
 2.增加新加源的证书 执行命令:
 wget http://www.dotdeb.org/dotdeb.gpg cat dotdeb.gpg | apt-key add -</description>
    </item>
    
    <item>
      <title>wordpress在nginx下的rewrite设置</title>
      <link>http://it580.com/nginx-e4-b8-8bwordpress-e7-9a-84rewrite/</link>
      <pubDate>Fri, 06 Jul 2007 16:38:27 +0000</pubDate>
      
      <guid>http://it580.com/nginx-e4-b8-8bwordpress-e7-9a-84rewrite/</guid>
      <description>因为服务器迁移的问题，新的web server是nginx。 可惜nginx不支持.htaccess。因此只能自己写rewrite规则。 我的站点url，wordpress里规则使用的是 http://blog.it580.com/%post_id%/.在nginx的配置文件中，配置如下:
 location / { index index.php index.html; if (!-e $request_filename) { rewrite ^/(.+)$ /index.php?p=$1 last; } }
 修改完配置后，别忘记将nginx的服务reload 一下。^O^</description>
    </item>
    
  </channel>
</rss>