全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
楼主: iamtime

[nginx] nginx规则问题,已经解决!

[复制链接]
 楼主| 发表于 2010-8-1 12:28:00 | 显示全部楼层
user  www www;
worker_processes 1;
error_log  /home/www/logs/nginx_error.log  crit;
pid        /usr/local/nginx/nginx.pid;
#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 1024;
events
        {
                use epoll;
                worker_connections 1024;
        }
http
        {
                include       mime.types;
                default_type  application/octet-stream;
                #charse  gb2312;
                server_names_hash_bucket_size 128;
                client_header_buffer_size 128k;
                large_client_header_buffers 4 256k;
                client_max_body_size 16m;
                sendfile on;
                tcp_nopush     on;
                keepalive_timeout 60;
                tcp_nodelay on;

                fastcgi_connect_timeout 300;
                fastcgi_send_timeout 300;
                fastcgi_read_timeout 300;
                fastcgi_buffer_size 64k;
                fastcgi_buffers 4 64k;
                fastcgi_busy_buffers_size 128k;
                fastcgi_temp_file_write_size 128k;

                gzip on;
                gzip_min_length  1k;
                gzip_buffers     4 16k;
                gzip_http_version 1.1;
                gzip_comp_level 9;
                gzip_types       text/plain application/x-javascript text/css application/xml;
                gzip_vary on;
                output_buffers   4 32k;
                postpone_output  1460;

                #limit_zone  crawler  $binary_remote_addr  10m;       
               
server
          {
                listen       80;
                server_name 173.224.209.173;
                index index.html index.htm index.php;
                include location.conf;
                root  /home/www;
           }
                include servers/*;
}

评分

参与人数 1威望 +7 收起 理由
xspoco + 7 再多加点...

查看全部评分

发表于 2010-8-1 12:31:46 | 显示全部楼层
user  www www;

worker_processes 1;

error_log  /home/wwwroot/logs/nginx_error.log  crit;

pid        /usr/local/nginx/logs/nginx.pid;

#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 51200;

events
        {
                use epoll;
                worker_connections 51200;
        }

http
        {
                include       mime.types;
                default_type  application/octet-stream;

                server_names_hash_bucket_size 128;
                client_header_buffer_size 32k;
                large_client_header_buffers 4 32k;
                client_max_body_size 8m;

                sendfile on;
                tcp_nopush     on;

                keepalive_timeout 60;

                tcp_nodelay on;

                fastcgi_connect_timeout 300;
                fastcgi_send_timeout 300;
                fastcgi_read_timeout 300;
                fastcgi_buffer_size 64k;
                fastcgi_buffers 4 64k;
                fastcgi_busy_buffers_size 128k;
                fastcgi_temp_file_write_size 256k;

                gzip on;
                gzip_min_length  1k;
                gzip_buffers     4 16k;
                gzip_http_version 1.0;
                gzip_comp_level 2;
                gzip_types       text/plain application/x-javascript text/css application/xml;
                gzip_vary on;

                #limit_zone  crawler  $binary_remote_addr  10m;

server
        {
                listen       80;
                server_name 173.224.209.173;
                index index.html index.htm index.php;
                root  /home/wwwroot;

                location ~ .*\.(php|php5)?$
                        {
                                fastcgi_pass  unix:/tmp/php-cgi.sock;
                                fastcgi_index index.php;
                                include fcgi.conf;
                        }

                location /status {
                        stub_status on;
                        access_log   off;
                }

                location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
                        {
                                expires      30d;
                        }

                location ~ .*\.(js|css)?$
                        {
                                expires      12h;
                        }

                log_format  access  '$remote_addr - $remote_user [$time_local] "$request" '
             '$status $body_bytes_sent "$http_referer" '
             '"$http_user_agent" $http_x_forwarded_for';
                access_log  /home/wwwroot/logs/access.log  access;
        }
include vhost/*.conf;
}

server
          {
                listen       80;
                server_name 173.224.209.173;
                index index.html index.htm index.php;
                include location.conf;
                root  /home/www;
           }
                include servers/*;
}
发表于 2010-8-1 12:36:51 | 显示全部楼层
然后我装了wordpress,发现固定连接里面总是有一个index.php,请问我改如何设置?

解决这个问题是在wordpress里面设置,而不是nginx..所以你弄错了....
发表于 2010-8-1 12:45:29 | 显示全部楼层
可以直接备份出你的数据然后下载出来重装的
/usr/local/mysql/bin/mysqldump -u数据用户 -p数据库密码 数据库名 > target.sql
 楼主| 发表于 2010-8-1 12:56:47 | 显示全部楼层

回复 13# 的帖子

你觉得我知道在wp后台设置吗?那个明显不是wp的问题!
 楼主| 发表于 2010-8-1 12:59:35 | 显示全部楼层
谢谢 咯拉无米!

评分

参与人数 1威望 +15 收起 理由
Linode + 15

查看全部评分

发表于 2010-8-1 13:03:34 | 显示全部楼层

回复 15# 的帖子

那么,你的固定链接设置格式是什么??

/%year%/%monthnum%/%postname%/  

这样??

因为你还没添加wordpress.conf 这个文件,所以如果你是设置了我上面的格式.访问是404的.但是你访问是带有index.php的,
那么你的wp固定链接,很可能是设置了类似  /index.php//%year%/%monthnum%/%postname%/
发表于 2010-8-1 14:19:50 | 显示全部楼层

回复 15# 的帖子

WP后台的设置我在你另一个帖子里贴过了
发表于 2010-8-1 14:41:16 | 显示全部楼层
其实我不知道他是用什么编辑器编辑的 conf
 楼主| 发表于 2010-8-4 10:58:08 | 显示全部楼层
鄙视某些人,真是可恶!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-5-16 17:49 , Processed in 0.064544 second(s), 13 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表