全球主机交流论坛

标题: LNMP一键安装后现在想添加一个网站怎么操作??? [打印本页]

作者: qwb    时间: 2009-12-9 10:52
提示: 作者被禁止或删除 内容自动屏蔽
作者: forgotten    时间: 2009-12-9 10:54
http://developer.51cto.com/art/200806/75652.htm
作者: qwb    时间: 2009-12-9 11:03
提示: 作者被禁止或删除 内容自动屏蔽
作者: mojave    时间: 2009-12-9 11:09
在nginx.conf添加server段,解析域名到你所要绑定的目录一样就行了,下面提供个注销日志的参考
server
        {
                listen       80;
                server_name bbs.moltown.com;
                index index.html index.htm index.php;
                root  /home/www/bbs.moltown.com;

                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 ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
                        {
                                expires      30d;
                        }

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

                access_log   off;
        }
  或者也可以在nginx.conf里面include vhost/*.conf;  在/usr/local/nginx/conf下面添加个vhost文件夹里面单独存放也行

[ 本帖最后由 mojave 于 2009-12-9 11:15 编辑 ]
作者: lemss    时间: 2009-12-9 11:23
标题: 回复 4# 的帖子
顶,提出问题的时候注意多搜索
作者: cpuer    时间: 2009-12-9 12:37
标题: 回复 4# 的帖子





欢迎光临 全球主机交流论坛 (https://sunk.eu.org/) Powered by Discuz! X3.4