Nginx vs Apache

Ask questions about Arch Linux ARM. Please search before making a new topic.

Re: Nginx vs Apache

Postby WarheadsSE » Wed Jan 18, 2012 9:31 pm

We'll need to patch a copy to fix the accept4 syscall that doesn't exist in that kernel.

/EDIT

yeah.. seems it'll figure that out at compile time...
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Nginx vs Apache

Postby xenoxaos » Wed Jan 18, 2012 9:35 pm

$this->bbcode_second_pass_quote('greenfly', 'I') got an Pogoplug Pro

2.6.31.6_SMP_820

ah okai... so I have to compile nginx myself then?


Have you by chance tried `pacman -Sy nginx` ?
Arch Linux ARM exists and continues to grow through community support, please donate today!
xenoxaos
Developer
 
Posts: 323
Joined: Thu Jan 06, 2011 1:45 am

Re: Nginx vs Apache

Postby greenfly » Wed Jan 18, 2012 9:45 pm

$this->bbcode_second_pass_quote('', 'H')ave you by chance tried `pacman -Sy nginx` ?

Yes, I reinstalled, but no change...


$this->bbcode_second_pass_quote('', '&')gt; Ah, it looks like Igor committed Simon's patch even without fixing
> availability test, and it basically checks only if one have recent
> enough glibc. So if you have recent glibc but an old kernel - it
> won't work at all.
>
> Just in case: workaround to recompile with explicitly disabled
> accept4() support, e.g. with something like:
>
> ./configure --with-cc-opt="-DNGX_HAVE_ACCEPT4=0"

Yes I just rebuilt the package with:


export CONFIGURE_OPTS='--with-cc-opt="-DNGX_HAVE_ACCEPT4=0"'

and the customary:

dpkg-buildpackage -r -T build

and

dpkg-buildpackage -r -T binary

It works perfectly now.

Thanks,
--- appa


So will something like this work? Sorry, I only know the basics of compiling and patching stuff and therefore I'm not shure if this debianic solution will work...
greenfly
 
Posts: 14
Joined: Thu Dec 01, 2011 7:26 pm
Top

Re: Nginx vs Apache

Postby xenoxaos » Wed Jan 18, 2012 9:49 pm

Damn that accept4(), that has been the bane of the 2.6.31 kernel!!!
Arch Linux ARM exists and continues to grow through community support, please donate today!
xenoxaos
Developer
 
Posts: 323
Joined: Thu Jan 06, 2011 1:45 am

Re: Nginx vs Apache

Postby greenfly » Wed Jan 18, 2012 9:58 pm

So maybe it's better to wait until the release of the 3.1 Kernel for OXNAS?

As said here http://archlinuxarm.org/forum/viewtopic.php?f=29&t=1410 it's maybe in the near future? :)
greenfly
 
Posts: 14
Joined: Thu Dec 01, 2011 7:26 pm

Re: Nginx vs Apache

Postby xenoxaos » Wed Jan 18, 2012 10:31 pm

Yes, the 3.1 kernel is relatively close to completion. Mostly right now trying to work on some speed improvements for the SATA, some networking offload, and a safe way to upgrade in the future. Be patient. kthxbai.
Arch Linux ARM exists and continues to grow through community support, please donate today!
xenoxaos
Developer
 
Posts: 323
Joined: Thu Jan 06, 2011 1:45 am

Re: Nginx vs Apache

Postby jamez » Thu Jan 19, 2012 3:56 am

This is an update on the nginx/php signal 11 problem I was having on my ping pogo (E02). I tried updating the whole system (pacman -Syu) and that did update the version of php-fpm but not nginx, and I still had the same signal 11 problem. So I built nginx from source and now it seems to be fine. Not sure if it was the updated version or the compile in the pogo environ that fixed it.

Here's what I did:
* save off /etc/nginx/* for ref
* save off /etc/rc.d/nginx for ref
* uninstall nginx (pacman -R nginx)
* install gcc and make via pacman (I think that's all you will need)
* get nginx source (I got 1.0.11 , http://nginx.org/download/nginx-1.0.11.tar.gz)
* after untarring, build nginx:

./configure
make
make install
(nginx will now be under /usr/local/nginx if you took defaults)

* copy saved nginx.conf into /usr/local/nginx/conf/
* probably a good idea to setup /etc/rc.d/nginx for easy start/stop, but this will work:
STOP:
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf -s stop
START:
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
jamez
 
Posts: 6
Joined: Mon Jan 02, 2012 4:39 pm

Re: Nginx vs Apache

Postby devr » Thu Jan 19, 2012 1:00 pm

So to better wrap my head around this thread I just wanted to check if there are two problems that are being discussed, or just one ?

Scenario 1: nginx package, running on an OXNAS platform with a kernel < 2.6.38 (accept4() syscall issue) .
Scenario 2: nginx package, running on a 3.1 kernel and seeing strange "signal 11 problem" errors in the log w/ php-fpm not working right.

Or are these two scenarios the same problem, just different platforms. I will give jamez steps a try tonight or this weekend and see if it works for me.

Since I was having issues with nginx, and wasn't happy with the lighttpd reverse proxy features in version 1.4 (1.5 had what I needed, but still being worked on), I decided to give Monkey HTTPD a try. It is an interesting daemon (It may be like lighttpd 1.4 reverse proxying). Strange that it to was having similar php issues that nginx was having. Could be related or not, since monkey hands php requests off to a custom php backend than php-fpm. I was working with the developer to triage this.

If I get all three working, will try to report how they work and basic perf stats.
devr
 
Posts: 87
Joined: Wed May 11, 2011 12:22 am

Re: Nginx vs Apache

Postby greenfly » Fri Jan 20, 2012 1:21 am

As a temporal solution I switched from php-fpm to php-cgi as described in the archiwki.
I had to remove the 'root' line from
$this->bbcode_second_pass_code('', 'location ~ \.php$ {
...
}')

before it gave me "no input file selected".
greenfly
 
Posts: 14
Joined: Thu Dec 01, 2011 7:26 pm

Re: Nginx vs Apache

Postby devr » Sun Jan 22, 2012 11:17 pm

Just an update. Compiling nginx 1.0.11 manually worked for me. So to have my manually compiled version match the same file locations as what I get from pacman, I used what I found in the PKGBUILD.
$this->bbcode_second_pass_code('', '_doc_root=/usr/share/nginx/http
_server_root=/etc/nginx
_conf_path=${_server_root}/conf
_tmp_path=/var/spool/nginx
_log_path=/var/log/nginx
_user=http
_group=http

./configure \
--prefix=${_server_root} \
--sbin-path=/usr/sbin/nginx \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/lock/nginx.lock \
--http-client-body-temp-path=${_tmp_path}/client_body_temp \
--http-proxy-temp-path=${_tmp_path}/proxy_temp \
--http-fastcgi-temp-path=${_tmp_path}/fastcgi_temp \
--http-log-path=${_log_path}/access.log \
--error-log-path=${_log_path}/error.log \
--user=${_user} --group=${_group} \
--with-imap --with-imap_ssl_module --with-http_ssl_module \
--with-http_stub_status_module \
--with-http_dav_module \
--with-http_gzip_static_module \
--with-ipv6 \
--add-module=/usr/lib/passenger/ext/nginx \
--http-scgi-temp-path=${_tmp_path} \
--http-uwsgi-temp-path=${_tmp_path}
')

About the only change from the PKGBUILD is that I removed the line, "--add-module=/usr/lib/passenger/ext/nginx"
devr
 
Posts: 87
Joined: Wed May 11, 2011 12:22 am

PreviousNext

Return to User Questions

Who is online

Users browsing this forum: No registered users and 28 guests