全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
楼主: licess
打印 上一主题 下一主题

LNMP 0.5-CentOS/Debian下Nginx+MySQL+PHP一键安装包(5月21日再次更新)

[复制链接]
1#
发表于 2010-3-20 01:08:44 | 显示全部楼层
我安装好0.3版的之后 是这样的
  1. server
  2.         {
  3.                 listen       80;
  4.                 server_name xxAAA.net;
  5.                 index index.html index.htm index.php;
  6.                 root  /home/wwwroot;

  7.                 location ~ .*\.(php|php5)?$
  8.                         {
  9.                                 fastcgi_pass  unix:/tmp/php-cgi.sock;
  10.                                 #fastcgi_pass  127.0.0.1:9000;
  11.                                 fastcgi_index index.php;
  12.                                 include fcgi.conf;
  13.                         }

  14.                 location /status {
  15.                         stub_status on;
  16.                         access_log   off;
  17.                 }

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

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

  26.                 log_format  access  '$remote_addr - $remote_user [$time_local] "$request" '
  27.              '$status $body_bytes_sent "$http_referer" '
  28.              '"$http_user_agent" $http_x_forwarded_for';
  29.                 access_log  /home/wwwroot/logs/access.log  access;
  30.         }
  31. include vhost/*.conf;
  32. }
复制代码
是不是应该在
  1. include vhost/*.conf;
  2. }
复制代码
上面加入
  1. server
  2. {
  3.   listen       80;
  4.   server_name xxBBB.com;
  5.   index index.html index.htm index.php;
  6.   root  /home/xxBBB;
  7.   location ~ .*\.(php|php5)?$
  8.    {
  9.     fastcgi_pass  unix:/tmp/php-cgi.sock;
  10.     #fastcgi_pass  127.0.0.1:9000;
  11.     fastcgi_index index.php;
  12.     include fcgi.conf;
  13.    }
  14.   location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  15.    {
  16.     expires      30d;
  17.    }
  18.   location ~ .*\.(js|css)?$
  19.    {
  20.     expires      12h;
  21.    }
  22.   access_log   off;
  23. }
复制代码
还是要将默认的那一段server 复制之后 修改为自己的域名和目录呢?
少了其中的
location ~ .*\.(php|php5)?$
会不会影响效率呢?
还有就是
  1. include fcgi.conf;
复制代码
这个是干嘛的?是调用的为静态吗?如果不是的话 可以取消吗?

我是完全的小白,在您的教程操作之下 3个小时左右就安装并成功运行了php 上传了discuz 非常棒!现在只差绑定多域名和为静态了
再次感谢一下您的教程

[ 本帖最后由 berliz 于 2010-3-20 01:37 编辑 ]
2#
发表于 2010-4-10 04:47:38 | 显示全部楼层

回复 1# 的帖子

我删除了/usr/local/nginx/logs/ 下的文件,现在nginx.conf无法更新 怎么办?
3#
发表于 2010-4-10 14:14:16 | 显示全部楼层

回复 120# 的帖子

我还是0.3版 出现了这个问题 现在无法绑定域名 只有在ssh中安装的时候提示的默认域名可以访问 其他的都不行了
难道必须要安装vhost.sh ?之前没有安装 只在nginx.conf中添加 然后 kill nginx.pid 就可以了的
4#
发表于 2010-5-4 23:13:12 | 显示全部楼层
军哥 刚下载的0.4 可是安装有点问题,但是后续还是继续在安装
如图
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-6-11 07:09 , Processed in 0.063398 second(s), 8 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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