nginx 进入 base

在OpenBSD环境下搭建各种服务器的相关讨论。

版主: lionuxchenjun天地乾坤

回复
头像
unreal
银 Ag
帖子: 1080
注册时间: 2010-06-07 18:52

nginx 进入 base

帖子 unreal » 2011-09-23 16:19

在 twitter 上看来的,6小时前的消息了。
@nginxorg
nginx has just been imported into openbsd base system #nginx #openbsd
勤能補拙 Just do it now!

头像
leo
帖子: 2465
注册时间: 2010-01-21 3:27

回复: nginx 进入 base

帖子 leo » 2011-09-23 22:11

NGINX FORUM上也找到一篇:
http://forum.nginx.org/read.php?2,21567 ... msg-215673
Amit Kulkarni
nginx imported into OpenBSD base
September 22, 2011 07:56PM
Hi all,

You guys will get that chroot stuff and the httpd man page due to the
hard work of OpenBSD guys... Eventually it will replace Apache-1.3 in
base. It will be mutually beneficial relationship.

thanks!!!

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

似乎没有看到官方的确切消息,如果确实是这样的,算是比较大的变动了,相应的PHP模块不知道如何处理,nginx+php的搭配是否可以抗衡现有的apache2+php5.3.6也有待实际验证。不过现有的port系统里需要对PHP进行配置和重新编译才能配合apache2。
此外,不知道是不是真的会将apache1.3剔除出base system?继续等待官方消息,估计5.0的发行版已经无法修改了。

我全新安装一下snapshot的试试。

头像
leo
帖子: 2465
注册时间: 2010-01-21 3:27

回复: nginx 进入 base

帖子 leo » 2011-09-23 23:17

确实进入用户岛了:

代码: 全选

# find / -name nginx
/usr/src/etc/nginx
/usr/src/usr.sbin/nginx
/usr/ports/www/nginx


但是我觉得不会这样快剔除apache 1.3,Nginx的稳定性和兼容性有待考证.

头像
acheng
锌 Zn
帖子: 581
注册时间: 2011-07-07 21:52

回复: nginx 进入 base

帖子 acheng » 2011-09-24 0:47

leo 写了:确实进入用户岛了:

代码: 全选

# find / -name nginx
/usr/src/etc/nginx
/usr/src/usr.sbin/nginx
/usr/ports/www/nginx


但是我觉得不会这样快剔除apache 1.3,Nginx的稳定性和兼容性有待考证.
嗯,想要进入BASE,nginx还需要证明自己,至少是在OpenBSD平台上.
引用自misc:
Hi Amit,

Amit Kulkarni wrote on Thu, Sep 22, 2011 at 06:47:29PM -0500:

> Wowwwww.........bye bye apache.

Not yet.
This is the start of a project, not the completion.
Now, nginx has to prove itself.

> Does it seem like changes are occurring at a blinding pace in last year?

Maybe, though certainly not during the last two months, unless i'm
quite mistaken. However, a general hackathon always shows, and the
hackathon that is coming to its end today, the first European
general hackathon (s2k11) in Ljubljana, certainly was a nice one.

Thanks to Mitja (kerberos.si) for setting up the infrastructure
for a great event, and for everything else he did to make this
such a fine week in Slovenia!

Yours,
Ingo


> On Thu, Sep 22, 2011 at 6:32 PM, Robert Nagy <robert@cvs.openbsd.org> wrote:
>> CVSROOT: /cvs
>> Module name: src
>> Changes by: robert@cvs.openbsd.org 2011/09/22 17:32:26
>>
>> Log message:
>> import of nginx 1.0.6 with a bundled libpcre needed for pcre to work
>> properly.
>> this is not yet linked to the build but we would like to work on it
>> in tree to provide an apache replacement for base
>>
>> Status:
>>
>> Vendor Tag: nginx
>> Release Tags: nginx_1_0_6
>>
>> N src/usr.sbin/nginx/Makefile.bsd-wrapper
[...]

头像
leo
帖子: 2465
注册时间: 2010-01-21 3:27

回复: nginx 进入 base

帖子 leo » 2011-12-10 16:31

这个似乎还没有完成吧?现在是不是用nginx要通过ports来安装? 我就等着修补好的nginx呢,要是一个"nginxd=yes"就搞定了就爽了。:D
看了看current的changlog:
  • Add a flag for nginx (-u) to disable chroot. Same config file can now be used whether chroot/non-chrooted setup.
  • Fixed Nginx ngx_http_core_module.c to specify root as /var/www/htdocs, not /var/www/html.
  • Fix the "nginx -s reopen" file reopening failure bug which occured because Nginx is in chroot.
  • Update to nginx-1.0.8 (many bug fixes)
  • Import of nginx 1.0.6 with a bundled libpcre. A possible replacement for Apache httpd(8) to be included in base.

f5b
锆 Zr
帖子: 643
注册时间: 2011-10-22 20:43

回复: nginx 进入 base

帖子 f5b » 2011-12-10 20:47

leo 写了:这个似乎还没有完成吧?现在是不是用nginx要通过ports来安装? 我就等着修补好的nginx呢,要是一个"nginxd=yes"就搞定了就爽了。:D
看了看current的changlog:
我也在等
nginx_flags=yes

头像
leo
帖子: 2465
注册时间: 2010-01-21 3:27

回复: nginx 进入 base

帖子 leo » 2011-12-11 1:32

f5b 写了:我也在等
nginx_flags=yes
版本号一直在跟进,但是项目的进展似乎非常缓慢,只在1.08时修复了很多的bug,不知道何时才能完成并正式进入base。

头像
leo
帖子: 2465
注册时间: 2010-01-21 3:27

回复: nginx 进入 base

帖子 leo » 2011-12-15 21:25

目前USER LAND里已经找不到nginx了,不知道为何?

f5b
锆 Zr
帖子: 643
注册时间: 2011-10-22 20:43

回复: nginx 进入 base

帖子 f5b » 2011-12-16 8:55

一直在
http://www.openbsd.org/cgi-bin/cvsweb/s ... bin/nginx/

已经是nginx 1.0.10 + pcre-8.21 了

就是没有build link到snapshot里面去

头像
leo
帖子: 2465
注册时间: 2010-01-21 3:27

回复: nginx 进入 base

帖子 leo » 2011-12-16 10:51

看来是这个原因了,我这台机器最近一直用snapshot来升级,根本就没有下载过源码。刚才下载一下src.tar.gz, 发现还在里面。

f5b
锆 Zr
帖子: 643
注册时间: 2011-10-22 20:43

回复: nginx 进入 base

帖子 f5b » 2012-03-21 10:18

最近的snapshot,安装后nginx包含在base里面啦

安装后
mkdir -p /var/www/tmp

/etc/rc.d/nginx start 可以临时启动

开机启动现在是rc.conf.local 添加
pkg_scripts="nginx"

头像
leo
帖子: 2465
注册时间: 2010-01-21 3:27

回复: nginx 进入 base

帖子 leo » 2012-03-22 8:08

不错,试了试。
指到了 /var/www/htdocs 的默认目录,访问后还是apache的默认页面,刚开始以为出错了,top了一下才放心。不过看来启动方式还是沿用了Packages的。:)

czjin
钛 Ti
帖子: 26
注册时间: 2011-12-31 15:47

回复: nginx 进入 base

帖子 czjin » 2013-02-15 14:59

我安装了openbsd5.2已经支持/etc/rc.d/下启动nginx了,并且配置文件root都指向了/htdocs,查看top正常,但php配置困难了,不能正常加载。
#/etc/rc.d/nginx start (stop,restart)
#top
load averages: 0.24, 0.14, 0.10 obn.localdomain 18:45:59
24 processes: 23 idle, 1 on processor
CPU states: 0.0% user, 0.0% nice, 0.0% system, 0.0% interrupt, 100% idle
Memory: Real: 24M/63M act/tot Free: 935M Cache: 24M Swap: 0K/2047M

PID USERNAME PRI NICE SIZE RES STATE WAIT TIME CPU COMMAND
8222 _mysql 2 0 40M 15M idle select 0:05 0.00% mysqld
1 root 10 0 564K 352K idle wait 0:01 0.00% init
1546 www 2 0 1644K 2212K sleep kqread 0:01 0.00% nginx
8631 root 3 0 720K 504K idle ttyin 0:01 0.00% ksh
19761 _pflogd 4 0 704K 324K sleep bpf 0:01 0.00% pflogd
11971 root 2 0 3420K 2620K sleep select 0:01 0.00% sshd
10688 _syslogd 2 0 472K 736K sleep poll 0:01 0.00% syslogd
5487 root 18 0 576K 516K idle pause 0:01 0.00% sh
6286 www 2 0 1656K 2216K idle kqread 0:00 0.00% nginx
22189 root 2 0 544K 892K idle select 0:00 0.00% cron
10815 root 2 0 364K 752K idle select 0:00 0.00% inetd
6035 root 2 0 456K 752K idle netio 0:00 0.00% syslogd
18917 root 3 0 348K 780K idle ttyin 0:00 0.00% getty
25125 root 3 0 400K 788K idle ttyin 0:00 0.00% getty
3891 root 2 0 640K 472K idle netio 0:00 0.00% pflogd
24171 root 3 0 300K 780K idle ttyin 0:00 0.00% getty
14537 root 28 0 1228K 2104K onproc - 0:00 0.00% top
31202 root 3 0 428K 788K idle ttyin 0:00 0.00% getty
10366 root 2 0 840K 1184K idle select 0:00 0.00% sshd
19579 root 18 0 1164K 1060K idle pause 0:00 0.00% nginx
16874 root 18 0 752K 520K idle pause 0:00 0.00% ksh
15436 _sndio 2 -20 448K 416K idle poll 0:00 0.00% sndiod

# vi nginx.conf

#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

#pid logs/nginx.pid;


events {
worker_connections 1024;
}


http {
include mime.types;
default_type application/octet-stream;

#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 logs/access.log main;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

#gzip on;

server {
listen 80;
server_name localhost;

#charset koi8-r;

#access_log logs/host.access.log main;

location / {
root /htdocs;
index index.html index.htm;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /htdocs;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass [url]http://127.0.0.1;[/url]
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root /htdocs;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /htdocs$fastcgi_script_name;
# include fastcgi_params;

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}

# HTTPS server
#
#server {
# listen 443;
# server_name localhost;

# ssl on;
# ssl_certificate /etc/ssl/server.crt;
# ssl_certificate_key /etc/ssl/private/server.key;

# ssl_session_timeout 5m;

# ssl_protocols SSLv2 SSLv3 TLSv1;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;

# location / {
# root /htdocs;
# index index.html index.htm;
# }
#}

}

czjin
钛 Ti
帖子: 26
注册时间: 2011-12-31 15:47

回复: nginx 进入 base

帖子 czjin » 2013-02-16 12:32

php已经能正常解析和加载了。以下步骤
#pkg_add -v php-fpm-5.3.14p0
#/etc/rc.d/php_fpm start
#vi /etc/rc.local
/etc/rc.d/php_fpm start

回复

在线用户

正浏览此版面之用户: 没有注册用户 和 29 访客