Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4261693
  • 博文数量: 601
  • 博客积分: 15410
  • 博客等级: 上将
  • 技术积分: 6884
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-16 08:11
个人简介

独学而无友,则孤陋而寡闻!

文章分类

全部博文(601)

文章存档

2020年(1)

2018年(4)

2017年(7)

2016年(42)

2015年(25)

2014年(15)

2013年(36)

2012年(46)

2011年(117)

2010年(148)

2009年(82)

2008年(37)

2007年(41)

分类: 系统运维

2009-10-05 18:56:07

server {
listen 12.345.678.90:80; # YOUR PUBLIC IP ADDRESS (just use listen 80 to bind to all interfaces)
server_name domain.com; # YOUR DOMAIN NAME (subdomains [blog.yourdomain.com] will also work here)

root /srv/www/nginx/domain.com/habari; # ABSOLUTE PATH TO YOUR HABARI INSTALLATION

location / {
index index.php index.html index.htm;

# serve static files that exist without running other rewrite tests
if (-f $request_filename) {
expires 30d;
break;
}

# send all non-existing file or directory requests to index.php
# GOTCHA: Make sure your rewrite rules are inside the location block.
if (!-e $request_filename) {
rewrite ^ /index.php last;
}
}

location ~ \.php$ {
fastcgi_pass localhost:53217; # PORT NUMBER WHERE YOU SPAWNED YOUR FCGI PROCESSES
fastcgi_index index.php;

fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # SAME PATH AS ABOVE
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param REDIRECT_STATUS 200;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
}


阅读(1260) | 评论(0) | 转发(0) |
0

上一篇:nginx + habari with https

下一篇:微博系统试用

给主人留下些什么吧!~~