扫描二维码关注官方公众号
12
返回列表 发布新帖

[PT建站] Ubuntu 10.10 快速架设PT站

评论33

leitian楼主Lv.7 发表于 2011-2-19 02:59:01 | 显示全部楼层
修改 /etc/php5/fpm/pool.d/www.conf


  1. pm.max_children = 12
  2. pm.start_servers = 20
  3. pm.min_spare_servers = 5
  4. pm.max_spare_servers = 35
复制代码

前面的;号去掉

然后修改/etc/nginx/nginx.conf
提议替换为下面的文件

  1. user  www-data;
  2. worker_processes 1;
  3. error_log  /var/log/nginx/error.log;
  4. pid        /var/run/nginx.pid;
  5. #Specifies the value for maximum file descriptors that can be opened by this process.
  6. worker_rlimit_nofile 51200;
  7. events
  8. {
  9.   use epoll;
  10.   worker_connections 51200;
  11. }
  12. http
  13. {
  14.   include       mime.types;
  15.   default_type  application/octet-stream;
  16.   server_names_hash_bucket_size 128;
  17.   client_header_buffer_size 32k;
  18.   large_client_header_buffers 4 32k;
  19.   client_max_body_size 8m;
  20.   sendfile on;
  21.   tcp_nopush     on;
  22.   keepalive_timeout 60;
  23.   tcp_nodelay on;
  24.   fastcgi_connect_timeout 300;
  25.   fastcgi_send_timeout 300;
  26.   fastcgi_read_timeout 300;
  27.   fastcgi_buffer_size 64k;
  28.   fastcgi_buffers 4 64k;
  29.   fastcgi_busy_buffers_size 128k;
  30.   fastcgi_temp_file_write_size 256k;
  31.   gzip on;
  32.   gzip_min_length  1k;
  33.   gzip_buffers     4 16k;
  34.   gzip_http_version 1.0;
  35.   gzip_comp_level 2;
  36.   gzip_types       text/plain application/x-javascript text/css application/xml;
  37.   gzip_vary on;
  38.   #limit_zone  crawler  $binary_remote_addr  10m;
  39. server
  40. {
  41.   listen 80;
  42.   listen [::]:80 default ipv6only=on;
  43.   server_name pt.caoyang.net;
  44.   index index.html index.htm index.php;
  45.   root  /home/www;
  46.   location ~ .*\.(php|php5)?$
  47.    {
  48.     fastcgi_pass  unix:/tmp/php-cgi.sock;
  49.     fastcgi_index index.php;
  50.     include fcgi.conf;
  51.    }
  52.   location /status {
  53.    stub_status on;
  54.    access_log   off;
  55.   }
  56.   location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  57.    {
  58.     expires      30d;
  59.    }
  60.   location ~ .*\.(js|css)?$
  61.    {
  62.     expires      12h;
  63.    }
  64.   log_format  access  '$remote_addr - $remote_user [$time_local] "$request" '
  65.              '$status $body_bytes_sent "$http_referer" '
  66.              '"$http_user_agent" $http_x_forwarded_for';
  67.   access_log  /var/log/nginx/access.log  access;
  68.                  include other.conf;
  69. }
  70. include vhost/*.conf;
  71. }

复制代码


另外在/etc/nginx 创建文件 fcgi.conf
  1. fastcgi_param GATEWAY_INTERFACE CGI/1.1;
  2. fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;

  3. fastcgi_param QUERY_STRING $query_string;
  4. fastcgi_param REQUEST_METHOD $request_method;
  5. fastcgi_param CONTENT_TYPE $content_type;
  6. fastcgi_param CONTENT_LENGTH $content_length;

  7. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  8. fastcgi_param SCRIPT_NAME $fastcgi_script_name;
  9. fastcgi_param REQUEST_URI $request_uri;
  10. fastcgi_param DOCUMENT_URI $document_uri;
  11. fastcgi_param DOCUMENT_ROOT $document_root;
  12. fastcgi_param SERVER_PROTOCOL $server_protocol;

  13. fastcgi_param REMOTE_ADDR $remote_addr;
  14. fastcgi_param REMOTE_PORT $remote_port;
  15. fastcgi_param SERVER_ADDR $server_addr;
  16. fastcgi_param SERVER_PORT $server_port;
  17. fastcgi_param SERVER_NAME $server_name;

  18. # PHP only, required if PHP was built with --enable-force-cgi-redirect
  19. fastcgi_param REDIRECT_STATUS 200;
复制代码
回复 点赞

使用道具 举报

zhangweiboLv.5 发表于 2011-4-9 05:46:27 | 显示全部楼层
你的源是默认的吗?
貌似我的10.0.4没有php5-fpm
回复 点赞

使用道具 举报

leitian楼主Lv.7 发表于 2011-4-9 06:02:52 | 显示全部楼层
你的源是默认的吗?
貌似我的10.0.4没有php5-fpm
zhangweibo 发表于 2011-4-9 05:46



    恩10.10是默认的 所以...我把标题设置为10.10

回复 点赞

使用道具 举报

yangguang1125@2Lv.6 发表于 2011-4-27 21:36:24 | 显示全部楼层
很不错的尝试。继续加油。
回复 点赞

使用道具 举报

wya6868Lv.2 发表于 2011-4-28 13:10:06 | 显示全部楼层
关键是Ubuntu这个系统 感觉不是linux里面最适合建站的 这个系统个人玩更好 !!!
回复 点赞

使用道具 举报

leitian楼主Lv.7 发表于 2011-4-28 14:33:09 | 显示全部楼层
其实服务器版本还不错,我一直在用
回复 点赞

使用道具 举报

iceboyLv.5 发表于 2011-4-28 14:37:36 | 显示全部楼层
{:2_126:}我昨天倒是捣鼓一下,试着在家里的NAS上搞个论坛,不会弄。动态IP搞了动态域名,还是不会弄。
头像好长啊~  详情 回复
发表于 2011-11-11 11:22
感谢yukult1984!
回复 点赞

使用道具 举报

leitian楼主Lv.7 发表于 2011-4-28 14:42:30 | 显示全部楼层
那个还是需要再捣鼓下
回复 点赞

使用道具 举报

czf347Lv.3 发表于 2011-4-29 02:23:47 | 显示全部楼层
呀。。。好专业。。。看不懂滴飘过。。。
同飘过,太专业了~  详情 回复
发表于 2011-11-11 11:23
回复 点赞

使用道具 举报

jkbtLv.2 发表于 2011-4-30 19:09:01 | 显示全部楼层
这个帖子好 有技术含量
回复 点赞

使用道具 举报

pkpk1Lv.2 发表于 2011-5-3 14:59:07 | 显示全部楼层
偶用CentOS建的...nginx负载好很多...呵呵~
回复 点赞

使用道具 举报

koalaz@2Lv.3 发表于 2011-5-8 03:06:18 | 显示全部楼层
linux,真的是一点都不懂啊,惭愧。
确实太有难度了~  详情 回复
发表于 2011-11-11 11:24
回复 点赞

使用道具 举报

jewel0218@2Lv.3 发表于 2011-5-9 15:06:32 | 显示全部楼层
不太懂!学习了!!!
回复 点赞

使用道具 举报

chunyangsuhao@2Lv.2 发表于 2011-5-11 12:26:21 | 显示全部楼层
{:1_97:}ubuntu系统不大会用。。。。。
回复 点赞

使用道具 举报

回复

懒得打字嘛,点击右侧快捷回复 【本站酷狼4T,750元】
您需要登录后才可以回帖 登录 | 注册

本版积分规则

投诉/建议联系

support@gebi1.cn

未经授权禁止转载,复制和建立镜像,
如有违反,追究法律责任
  • 关注公众号
  • 添加微信客服
Copyright © 2001-2024 隔壁网 版权所有 All Rights Reserved. 粤ICP备14056481号-1
关灯 在本版发帖
扫一扫添加微信客服
返回顶部
快速回复 返回顶部 返回列表