Can't start nginx

Maxim Dounin mdounin at mdounin.ru
Mon Jul 13 15:52:31 MSD 2009


Hello!

On Sat, Jul 11, 2009 at 05:13:20PM +0200, Andreas Vieten wrote:

> Hello,
> 
> I've tried a serveral times to start nginx but it always ends with no
> happy end.
> 
> Download and compiling is no problem for me.
> 
> So here goes my way that i do it:
> 
> 1) cd /tmp
>    wget wget http://sysoev.ru/nginx/nginx-0.7.61.tar.gz
>    tar xvfz nginx-0.7.61.tar.gz
>    cd nginx-0.7.61
> 
> ./configure \
>   --prefix=/usr \

With this prefix and without --sbin-path set nginx will install 
it's binary into /usr/sbin/nginx.

>   --conf-path=/etc/nginx/nginx.conf \
>   --http-log-path=/var/log/nginx/access_log \
>   --error-log-path=/var/log/nginx/error_log \
>   --pid-path=/var/run/nginx.pid \
>   --http-client-body-temp-path=/var/tmp/nginx/client \
>   --http-proxy-temp-path=/var/tmp/nginx/proxy \
>   --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi \
>   --with-md5-asm --with-md5=/usr/include \

Do you have md5 library *sources* in /usr/include?  Note that 
--with-md5 specifies path to md5 library sources (and nginx will 
try to build them), it's not path to headers.

>   --with-http_realip_module \
>   --with-http_ssl_module \
>   --with-http_stub_status_module
> 
>    make
>    make install
> 
> 2) vi /etc/init.d/nginx
> 
> 
> #! /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

Seems to be using /usr/local/sbin/nginx binary, while you've just 
compiled /usr/sbin/nginx one (if build succeded - I'm not sure due 
to wierd configure arguments).

Note that other parts of your init script assume /usr/local/... 
paths as well.

[...]

Maxim Dounin





More information about the nginx mailing list