设为首页收藏本站

简体中文 繁體中文 English 日本語 Deutsch 한국 사람 بالعربية TÜRKÇE português คนไทย french

搜索
热搜: 活动 交友 discuz

帅哥美女~来看看我的什么代码错了~开启不到伪静态啊~ [复制链接]
查看:49 | 回复:5

2

主题

17

回帖

46

积分

新手上路

积分
46
发表于 2010-12-23 08:43:28 | 显示全部楼层 |阅读模式
user  www www;
worker_processes 8;
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 51200;
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  *****.*** www.***.*** ***.***.** ***..*** 188.**.**.**;
                index index.php;
                include location.conf;
                root  /home/www;

                location ~ .*\.(php|php5)?$
       {      
               #fastcgi_pass  unix:/tmp/php-cgi.sock;
               fastcgi_pass  127.0.0.1:9000;
               fastcgi_index index.php;
               include fcgi.conf;
       }
    location / {
rewrite ^([^\.]*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last;
rewrite ^([^\.]*)/article-([0-9]+)-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3 last;
rewrite ^([^\.]*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last;
rewrite ^([^\.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last;
rewrite ^([^\.]*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3 last;
rewrite ^([^\.]*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3 last;
rewrite ^([^\.]*)/([a-z]+)-(.+)\.html$ $1/$2.php?rewrite=$3 last;
if (!-e $request_filename) {
        return 404;
}



DiscuzX1.5的

文件啊~
http://188.95.51.66/nginx.conf

[ 本帖最后由 calido 于 2010-12-23 09:12 编辑 ]

2

主题

17

回帖

46

积分

新手上路

积分
46
 楼主| 发表于 2010-12-23 09:14:07 | 显示全部楼层


405

主题

1万

回帖

2万

积分

论坛元老

积分
24541
发表于 2010-12-23 09:27:41 | 显示全部楼层
空间速度不错。

2

主题

17

回帖

46

积分

新手上路

积分
46
 楼主| 发表于 2010-12-23 11:48:51 | 显示全部楼层
知道是什么空间吗!

14

主题

883

回帖

1832

积分

金牌会员

积分
1832
发表于 2010-12-23 12:11:29 | 显示全部楼层
[ol]
  • rewrite ^([^\.]*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last;
  • rewrite ^([^\.]*)/article-([0-9]+)-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3 last;
  • rewrite ^([^\.]*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last;
  • rewrite ^([^\.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last;
  • rewrite ^([^\.]*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3 last;
  • rewrite ^([^\.]*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3 last;
  • rewrite ^([^\.]*)/([a-z]+)-(.+)\.html$ $1/$2.php?rewrite=$3 last;
  • if (!-e $request_filename) {
  •         return 404;
  • }[/ol]复制代码保存为discuzx.conf include discuzx.conf; 我是这要做的 伪静态没问题
  • 66

    主题

    915

    回帖

    2056

    积分

    金牌会员

    积分
    2056
    发表于 2010-12-23 13:51:36 | 显示全部楼层
    [ol]
  • rewrite ^([^\.]*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last;
  • rewrite ^([^\.]*)/article-([0-9]+)-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3 last;
  • rewrite ^([^\.]*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last;
  • rewrite ^([^\.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last;
  • rewrite ^([^\.]*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3 last;
  • rewrite ^([^\.]*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3 last;
  • rewrite ^([^\.]*)/([a-z]+)-(.+)\.html$ $1/$2.php?rewrite=$3 last;
  • if (!-e $request_filename) {
  •         return 404;
  • }[/ol]复制代码这样加,我95%的客户安装的 DZX
  • 您需要登录后才可以回帖 登录 | 立即注册

    论坛客服/商务合作/投诉举报:2171544 (QQ)
    落伍者创建于2001/03/14,本站内容均为会员发表,并不代表落伍立场!
    拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论!
    落伍官方微信:2030286 邮箱:(djfsys@gmail.com|tech@im286.com)
    © 2001-2014

    浙公网安备 33060302000191号

    浙ICP备11034705号 BBS专项电子公告通信管[2010]226号

      落伍法律顾问: ITlaw-庄毅雄

    Archiver|手机版|Discuz! X

    GMT+8, 2026-6-15 17:36 , Processed in 0.018067 second(s), 3 queries , Gzip On, Redis On.

    返回顶部