最近文章更新
- 1966年生产的广州 珠江 SB6-2型 ..
- HD6870/6850全面评测,让你大饱眼..
- 百万现金刚入门 中国7大奢华私人..
- 罕见4G希捷酷鱼系类万转SCSI服务..
- IBM 6x86MX PR333 CPU
- 采用MC68000 CPU的进口老计算机主..
- 1989年IBM-XT机软驱
- BC3型饱和标准电池拆解
- JUKO ST
- Kingston 品牌的CPU
- YAMAHA 719
- intel 30线 内存条
- intel mmx cpu和主板
- 首款xHCI 1.0正式版标准USB 3.0控..
- 《极品飞车:地下狂飙》纹理MOD视..
- USB接口加扩展子卡:影驰神秘GTX..
- 阿里巴巴将发布浏览器 核心不是W..
- 黄仁勋大秀NVIDIA LOGO纹身
- Google Earth上的奇特卫星图片
- 开火!讯景限量版HD 5970详细测试..
相关文章链接
本类文章排行
最新新闻资讯
本周下载排行
- ArcSoft TotalMedia Theatre 3 P..
- Windows 7 Build 7600 16385 RTM..
- 《姗姗来迟软件光盘+飞扬PE工具箱..
- MSDN Windows 7 RTL 7600 Ultima..
- Windows 7 Home Premium (x86) -..
- Windows Virtual PC (x86) - (Mu..
- MSDN Windows 7 Language Pack X..
- Windows 7 Language Pack (x64) ..
- Windows 7 Starter (x86) - DVD ..
- Windows 7 Professional (x86) -..
- Windows 7 Language Pack (x86) ..
- Windows 7 Home Premium (x64) -..
- Windows XP Mode (x86, x64) - (..
- 7127.0.090507-1820_x86fre_clie..
- DMG2ISO
本月下载排行
- ArcSoft TotalMedia Theatre 3 P..
- Windows 7 Build 7600 16385 RTM..
- 《姗姗来迟软件光盘+飞扬PE工具箱..
- MSDN Windows 7 RTL 7600 Ultima..
- MSDN Windows 7 Language Pack X..
- Windows 7 Home Premium (x86) -..
- Windows 7 Language Pack (x64) ..
- Windows 7 Professional (x86) -..
- 7127.0.090507-1820_x86fre_clie..
- Windows 7 Professional (x64) -..
- Windows 7 Starter (x86) - DVD ..
- Windows Virtual PC (x86) - (Mu..
- Windows 7 Ultimate (x64) - DVD..
- Lenovo Windows 7 Ultimate OEM ..
- Windows 7 Home Premium (x64) -..
- 阅览次数: 文章来源: 原文作者: 整理日期: 2010-07-27
- cd ..
- sudo wget http://sysoev.ru/nginx/nginx-0.6.35.tar.gz
- sudo tar zxvf nginx-0.6.35.tar.gz
- sudo rm -f nginx-0.6.35.tar.gz
- cd nginx-0.6.35
- sudo ./configure --sbin-path=/usr/local/sbin --with-http_ssl_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_stub_status_module
- sudo make && sudo make install
- sudo ln -s /usr/local/nginx/conf /etc/nginx
- user www-data;
- worker_processes 6;
- events {
- worker_connections 1024;
- }
- http {
- include mime.types;
- default_type application/octet-stream;
- sendfile on;
- keepalive_timeout 10 10;
- gzip on;
- gzip_comp_level 1;
- gzip_proxied any;
- gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
- log_format main '$remote_addr - $remote_user [$time_local] '
- '"$request" $status $body_bytes_sent "$http_referer" '
- '"$http_user_agent" "$http_x_forwarded_for"';
- access_log /var/log/nginx_access.log main;
- error_log /var/log/nginx_error.log debug;
- include /usr/local/nginx/sites-enabled/*;
- }
- fastcgi_connect_timeout 60;
- fastcgi_send_timeout 180;
- fastcgi_read_timeout 180;
- fastcgi_buffer_size 128k;
- fastcgi_buffers 4 256k;
- fastcgi_busy_buffers_size 256k;
- fastcgi_temp_file_write_size 256k;
- fastcgi_intercept_errors on;
- #! /bin/sh
- ### BEGIN INIT INFO
- # Provides: nginx
- # Required-Start: $all
- # Required-Stop: $all
- # Default-Start: 2 3 4 5
- # Default-Stop: 0 1 6
- # Short-Description: starts the nginx web server
- # Description: starts nginx using start-stop-daemon
- ### END INIT INFO
- PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
- DAEMON=/usr/local/sbin/nginx
- NAME=nginx
- DESC=nginx
- test -x $DAEMON || exit 0
- # Include nginx defaults if available
- if [ -f /etc/default/nginx ] ; then
- . /etc/default/nginx
- fi
- set -e
- case "$1" in
- start)
- echo -n "Starting $DESC: "
- start-stop-daemon --start --quiet --pidfile /usr/local/nginx/logs/$NAME.pid \
- --exec $DAEMON -- $DAEMON_OPTS
- echo "$NAME."
- ;;
- stop)
- echo -n "Stopping $DESC: "
- start-stop-daemon --stop --quiet --pidfile /usr/local/nginx/logs/$NAME.pid \
- --exec $DAEMON
- echo "$NAME."
- ;;
- restart|force-reload)
- echo -n "Restarting $DESC: "
- start-stop-daemon --stop --quiet --pidfile \
- /usr/local/nginx/logs/$NAME.pid --exec $DAEMON
- sleep 1
- start-stop-daemon --start --quiet --pidfile \
- /usr/local/nginx/logs/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
- echo "$NAME."
- ;;
- reload)
- echo -n "Reloading $DESC configuration: "
- start-stop-daemon --stop --signal HUP --quiet --pidfile /usr/local/nginx/logs/$NAME.pid \
- --exec $DAEMON
- echo "$NAME."
- ;;
- *)
- N=/etc/init.d/$NAME
- echo "Usage: $N {start|stop|restart|force-reload}" >&2
- exit 1
- ;;
- esac
- exit 0
Nginx + PHP-FPM + APC=绝妙的组合
Nginx + PHP-FPM + APC=绝妙的组合
Nginx
和编译PHP一样非常简单:
再创建一个链接:
下一步是可有可无的,但我一直使用至今,说说也无妨。打开/etc/nginx/nginx.conf,最终修改结果如下:
我们也设置了一些FastCGI参数,让PHP不会噎着,也可以避免Nginx 503错误,打开/etc/nginx/fastcgi_params,添加以下参数:
最后,我们创建一个SystemV风格的启动脚本,保存为/etc/init.d/nginx。
不要忘了设置可执行权限。
查看所有评论
网友对Nginx + PHP-FPM + APC=绝妙的组合的评论
我要发表评论