GithubHelp home page GithubHelp logo

gplessis / dotdeb-nginx Goto Github PK

View Code? Open in Web Editor NEW
63.0 63.0 31.0 8.31 MB

Dotdeb : Nginx

Home Page: http://www.dotdeb.org/

License: BSD 2-Clause "Simplified" License

Perl 0.13% HTML 0.02% C 96.64% XS 0.42% C++ 0.30% Vim Script 2.48%

dotdeb-nginx's People

Contributors

daniel15 avatar finkregh avatar gplessis avatar huglester avatar joolswills avatar kartikm avatar pnommensen avatar sloonz avatar tjasko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dotdeb-nginx's Issues

[Feature Request] Re-add Passenger support

at least 2 comments on the blog asking why it was removed. Unless theres good technical reason not to, please consider re-enabling passenger support as this likely causes for many who then have to go through a reconfiguration process not just in server but in some cases there app codebase's

for example passengers own nginx repos dont have latest nginx versions as quickly or reliably as dotdeb did!

Can't see dotdeb packages on wheezy

Hi guys

I apologise if this if the wrong forum but i'm trying to install nginx via dotdeb sources and having no luck. I have so far:

  • Created a vanilla (VM, virtualbox on OSX 10.8) Debian 7.0 install
  • Added dotdeb sources in /etc/apt/sources.list.d/dotdeb.list (inc. adding the gpg key)
  • Run apt-get update

What i see is that the dotdeb sources are being ignored by apt and i can't see why:

apt-get update
Hit http://mirror.ox.ac.uk wheezy Release.gpg
Hit http://packages.dotdeb.org wheezy Release.gpg
Get:1 http://mirror.ox.ac.uk wheezy-updates Release.gpg [1,571 B]
Hit http://packages.dotdeb.org wheezy Release
Hit http://mirror.ox.ac.uk wheezy Release
Hit http://security.debian.org wheezy/updates Release.gpg
Get:2 http://mirror.ox.ac.uk wheezy-updates Release [116 kB]
Hit http://security.debian.org wheezy/updates Release
Hit http://packages.dotdeb.org wheezy/all Sources
Hit http://packages.dotdeb.org wheezy/all amd64 Packages
Hit http://security.debian.org wheezy/updates/main Sources
Hit http://security.debian.org wheezy/updates/main amd64 Packages
Hit http://security.debian.org wheezy/updates/main Translation-en
Hit http://mirror.ox.ac.uk wheezy/main Sources
Hit http://mirror.ox.ac.uk wheezy/main amd64 Packages
Hit http://mirror.ox.ac.uk wheezy/main Translation-en
Get:3 http://mirror.ox.ac.uk wheezy-updates/main Sources [14 B]
Get:4 http://mirror.ox.ac.uk wheezy-updates/main amd64 Packages [14 B]
Get:5 http://mirror.ox.ac.uk wheezy-updates/main Translation-en [14 B]
Ign http://packages.dotdeb.org wheezy/all Translation-en_GB
Ign http://packages.dotdeb.org wheezy/all Translation-en

the "Translation-en..." looks odd to me but maybe that's a wheezy thing?

My conf files are:

/etc/apt/sources.list:
deb http://mirror.ox.ac.uk/debian/ wheezy main
deb-src http://mirror.ox.ac.uk/debian/ wheezy main

deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main

deb http://mirror.ox.ac.uk/debian/ wheezy-updates main
deb-src http://mirror.ox.ac.uk/debian/ wheezy-updates main

/etc/apt/sources.list.d/dotdeb.list:
deb http://packages.dotdeb.org wheezy all
deb-src http://packages.dotdeb.org wheezy all

i have no source pins or anything, this is a plain/vanilla install.

Any suggestions or pointers would be very much appreciated! This is my first wheezy install but i've used Debian for many years.

Edit: Apologies for the formatting...

Cheers
Neil

Add nginx-x-rid-header into nginx-extras

Hello,

Could you please include a flavor of the 3rd party nginx-x-rid-header module? It'd be very useful to know which front-end request corresponds to which back-end one.

I could try to hack up a pull request, but I happily managed to evade butchering up the codebase, thanks to DotDeb :)

Thanks,
Pas

Support for Wheezy?

Hi,

I was wondering when support for Wheezy will be introduced? I upgraded to Wheezy and had to downgrade from nginx-extras to nginx-full as nginx-extras complains about perlapi and libperl versions.

Thanks,
Terry

PID parsing in the init script

Reported by one user :

I was troubleshooting an issue why the dotdeb version of nginx wasn't working. I discovered that the awk was playing it a little fast and loose and was finding the word pid anywhere in the file. I have some server_name's with the string pid in them, which was preventing it from starting. Here's a more strict awk that prevents it from happening:

awk -F'[ ;]' '$1 !~ /^#/ && /^pid / {print $2}' /etc/nginx/nginx.conf

(But this solution does not handle pid with leading withespaces)

Incomplete page by nginx -> fcgi -> php-fpm with keepalive

From http://forum.nginx.org/read.php?2,235764,235764 :

I have problem somewhere between nginx and php-fpm. When I use keep-alive connection for fastgcgi php-fpm, there is often problem with loading page. Page not completely loaded. I tried to debug using wireshark, and see that php-fpm send to nginx coplete reply, but nginx to client sent incoplete page. Size of incomplete page is defined by chunk size. For test, download http://kinohled.cz/bugreport.tar.gz and run ./showBug.sh . You will se:

Run Nginx on port 9876
Run php-fpm on port 6789
Correct size of answer is 16172;
keepalive on, size: 8002
keepalive off, size: 16172
Next test (1 of 5)-
...

Tested on Debian Squeeze and many version of Nginx/PHP-FPM . Error shows on default Nginx/PHP-FPM version by Debian Squeeze by dotdeb.org .

nginx/1.2.6
PHP 5.3.21-1~dotdeb.0

On Nginx error log:

upstream sent unsupported FastCGI protocol version: 0 while reading upstream

Patch here

/etc/init.d/nginx script fails if nginx.conf pid variable is differently formatted than default.

copied from the original blog comment:

if pid variable in /etc/nginx/nginx.conf is somewhat different than : pid /var/run/nginx.pid; .., (eg. more spaces between “pid” and “/var/run/nginx.pid”) then /etc/init.d/nginx script fails with message :
nginx: invalid option: “/var/run/nginx.pid”.

i think problem is in /etc/init.d/nginx , statement :
PID=$(awk -F’[ ;]‘ ‘/[^#]pid/ {print $2}’ /etc/nginx/nginx.conf).
result of awk is different in that case and init.d nginx script fails…

if you need more info like awk results and the original/new nginx.conf, let me know,

thx.

Init script should output test errors

This is congruent with the mainline debian packages.

Here is a patch for this.

--- nginx.orig  2013-04-09 15:41:31.772114565 -0700
+++ nginx       2013-04-09 16:06:24.555861260 -0700
@@ -39,12 +39,14 @@
 fi

 test_nginx_config() {
-               $DAEMON -t $DAEMON_OPTS > /dev/null 2>&1
-               retvar=$?
-               if [ $retvar -ne 0 ]
-               then
+               set +e
+               OUTPUT=`$DAEMON -t $DAEMON_OPTS 2>&1`
+               if [ $? -ne 0 ]; then
+                       echo "Configuration test failed!" >&2
+                       echo -n "$OUTPUT\n"
                        exit $retvar
                fi
+               set -e
 }

 start() {

This will print the failure messages so they can be fixed.

Here is example output with the patch.

Broken Config

root@dev:/etc/init.d# service nginx restart
Configuration test failed!
nginx: [emerg] unknown directive "hey_lets_fail" in /etc/nginx/sites-enabled/vc-admin-tbutler:13
nginx: configuration file /etc/nginx/nginx.conf test failed
root@dev:/etc/init.d#

Working Config

root@dev:/etc/init.d# service nginx restart
Restarting nginx: nginx.
root@dev:/etc/init.d#

nginx-extras has unmet dependencies

Hi,

I am on ubuntu 12.04 and when I am trying to install nginx-extras I get the error:

    apt-get install nginx-extras
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
     nginx-extras : Depends: perlapi-5.10.1 but it is not installable
                    Depends: libperl5.10 (>= 5.10.1) but it is not installable
    E: Unable to correct problems, you have held broken packages.

Is it my repositories that are missing these libraries or have they been rename?

Thanks.
Dominick

[module] adding ngx_cache_purge

This module is for purging selected elements in cache with proxy_cache or fastcgi_cache.

Is like purge method in Varnish. In different CMS (Wordpress, Drupal, Magento, ...) plugins are available to clear only modified urls. This module accept PURGE method and prefix in url like /purge/page.html

The module url https://github.com/FRiCKLE/ngx_cache_purge/ available form 0.7 to 1.1 Nginx branch.

Thanks

Default nginx config produces HTTP 500 out of box

I believe there’s a problem with nginx’s default config (/etc/nginx/sites-available/default).

root /usr/share/nginx/www;

But there’s no such directory and it causes nginx to loop while searching for index.html:

[error] 2003#0: *1 rewrite or internal redirection cycle while internally redirecting to "/index.html"

As a result user gets error 500 instead of ‘Welcome to nginx!’ page out of box.

Changing default root to /usr/share/nginx/html (which actually exists) solves the problem.

Failed to start nginx-naxsi-ui

Hi guys, i try to install nginx-naxsi-ui but it's not running 😢

Here my step

apt-get install nginx-naxsi nginx-naxsi-ui

And i've got install depencies to

dbconfig-common libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient16 libnet-daemon-perl libplrpc-perl mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server mysql-server-5.5 mysql-server-core-5.5 nginx-common nginx-naxsi nginx-naxsi-ui python-mysqldb python-openssl python-pam python-pkg-resources python-serial python-twisted-bin python-twisted-core python-twisted-web

And here the screenshoot nginx-naxsi-ui failed to running

Screen Shot 2013-02-02 at 7 56 03 AM

~
Setting up python-twisted-web (10.1.0-1) ...
Setting up nginx-naxsi-ui (1.2.6-1~dotdeb.0) ...
dbconfig-common: writing config to /etc/dbconfig-common/nginx-naxsi-ui.conf

Creating config file /etc/dbconfig-common/nginx-naxsi-ui.conf with new version
granting access to database naxsi_ui for naxsi_ui@localhost: success.
verifying access for naxsi_ui@localhost: success.
creating database naxsi_ui: success.
verifying database naxsi_ui exists: success.
dbconfig-common: flushing administrative password
Processing triggers for python-support ...
root@debianwaf:~# /etc/init.d/nginx status
could not access PID file for nginx ... failed!
root@debianwaf:~# /etc/init.d/nginx start
Starting nginx: nginx.
root@debianwaf:~# /etc/init.d/nginx-ui start
-bash: /etc/init.d/nginx-ui: No such file or directory
root@debianwaf:~# /etc/init.d/nginx-naxsi-ui start
Starting nginx-naxsi-ui: nginx-naxsi-ui_intercept.
nginx-naxsi-ui_extract.
root@debianwaf:~# /etc/init.d/nginx-naxsi-ui status
nginx-naxsi-ui_extract is not running ... failed!
root@debianwaf:~# /etc/init.d/nginx status
nginx is running.

Fail to compile nginx-1.6.0

Hello
Trying to recomplile nginx from sources:

apt-get source nginx
cd nginx-1.6.0
dpkg-buildpackage -rfakeroot -us -uc

and got errors:

dpkg-source: info: using source format `3.0 (quilt)'
dpkg-source: info: building nginx using existing ./nginx_1.6.0.orig.tar.gz
dpkg-source: error: unwanted binary file: debian/modules/ruby-passenger/ext/common/libpassenger_common.a
dpkg-source: error: unwanted binary file: debian/modules/ruby-passenger/ext/common/libboost_oxt.a
dpkg-source: error: unwanted binary file: debian/modules/ruby-passenger/ext/common/libpassenger_common/aggregate.o
dpkg-source: error: unwanted binary file: debian/modules/ruby-passenger/ext/common/libboost_oxt/aggregate.o
dpkg-source: error: unwanted binary file: debian/modules/ruby-passenger/ext/ruby/ruby-1.8.7-x86_64-linux/passenger_native_support.o
dpkg-source: error: unwanted binary file: debian/modules/ruby-passenger/ext/ruby/ruby-1.8.7-x86_64-linux/passenger_native_support.so
dpkg-source: error: unwanted binary file: debian/modules/ruby-passenger/agents/PassengerWatchdog
dpkg-source: error: unwanted binary file: debian/modules/ruby-passenger/agents/PassengerLoggingAgent
dpkg-source: error: unwanted binary file: debian/modules/ruby-passenger/agents/nginx/PassengerHelperAgent
dpkg-source: error: detected 9 unwanted binary files (add them in debian/source/include-binaries to allow their inclusion).
dpkg-buildpackage: error: dpkg-source -b nginx-1.6.0 gave error exit status 2

Looks like clean in rules is missing some rm

Nginx (re)start, reload fails silently if there's a problem in config

Prior to start/restart/reload, the script in init.d tests nginx' config.
If the config test (sudo nginx -t) fails, no message is printed on standard output and the server doesn't start/restart/reload.

dotdeb:

test_nginx_config() {
                $DAEMON -t $DAEMON_OPTS >/dev/null 2>&1
                retvar=$?
                if [ $retvar -ne 0 ]
                then
                        exit $retvar
                fi
}

squeeze:

test_nginx_config() {
  if $DAEMON -t $DAEMON_OPTS >/dev/null 2>&1
  then
    return 0
  else
    $DAEMON -t $DAEMON_OPTS
    return $?
  fi
}

Compile with hardening flags

any reason why nginx is compiled without any hardening flag?

# hardening-check /usr/sbin/nginx
/usr/sbin/nginx:
Position Independent Executable: no, normal executable!
Stack protected: no, not found!
Fortify Source functions: no, not found!
Read-only relocations: no, not found!
Immediate binding: no, not found!

HOWTO build *.deb from dotdeb source

I'm trying to compile sources from dotdeb.org on armhf (Raspbian), but both witch "./debian/rules binary" and with "dpkg-buildpackage -uc -us" fails a build process.

What ist the right way to build packages from your sources?

Fail to build from source

Hi, first thanks for your project I love it!

I was trying to build nginx from source based on the latest master here, but it is failing in applying the syslog patch. Looking at the source of the patch (https://github.com/yaoweibin/nginx_syslog_patch) it says that 1.3.11 patch is only for nginx 1.3.9+. While the 1.2.0 patch that was being used previously is for 1.2.0-1.3.9. Was swapping to the 1.3.11 patch due to some of the back ported changes in 1.2.7?

Any idea why a clean build would fail? Running debuild -S -sa I get:
dpkg-source: error: LC_ALL=C patch -t -F 0 -N -p1 -u -V never -g0 -E -b -B .pc/syslog_1.3.11.patch/ < nginx-1.2.7.orig.rRSKJM/debian/patches/syslog_1.3.11.patch gave error exit status 1
dpkg-buildpackage: error: dpkg-source -b nginx-1.2.7 gave error exit status 2
debuild: fatal error at line 1350:
dpkg-buildpackage -rfakeroot -d -us -uc -S -sa failed

lua-nginx module update

Hello,

I would like to use dotdeb-nginx with lua-nginx module on my servers but it seems that the lua-nginx is not up to date in dotdeb-nginx.

Can you update lua-nginx module ?

If yes, what are the rules or schedules for this module update ?

Thanks for your work.

update naxsi module

The bundled version is from May 2014. Current version now is 7880ed4487 (10 feb 2015).

init.d script does not show an error.

#20
I test.

http://poiuty.ru/img/ad4eb6a95e758253e68b25a12215.png - error
http://poiuty.ru/img/8781d33118c08cb0766b792d91a0.png - does not show an error.

init.d
test_nginx_config() {
  $DAEMON -t $DAEMON_OPTS >/dev/null 2>&1
  retvar=$?
  if [ $retvar -ne 0 ]
  then
    $DAEMON -t $DAEMON_OPTS
    exit $?
  fi
}

if you use init.d scrpt from official deb package ( http://nginx.org/packages/debian/ ) -> Errors are displayed normally

#!/bin/sh
### BEGIN INIT INFO
# Provides:          nginx
# Required-Start:    $network $remote_fs $local_fs 
# Required-Stop:     $network $remote_fs $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Stop/start nginx
### END INIT INFO

# Author: Sergey Budnevitch <[email protected]>

PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC=nginx
NAME=nginx
CONFFILE=/etc/nginx/nginx.conf
DAEMON=/usr/sbin/nginx
DAEMON_ARGS="-c $CONFFILE"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

[ -x $DAEMON ] || exit 0

[ -r /etc/default/$NAME ] && . /etc/default/$NAME

. /lib/init/vars.sh

. /lib/lsb/init-functions

do_start()
{
    start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
        $DAEMON_ARGS
    RETVAL="$?"
    return "$RETVAL"
}

do_stop()
{
    # Return
    #   0 if daemon has been stopped
    #   1 if daemon was already stopped
    #   2 if daemon could not be stopped
    #   other if a failure occurred
    start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
    RETVAL="$?"
    rm -f $PIDFILE
    return "$RETVAL"
}

do_reload() {
    #
    start-stop-daemon --stop --signal HUP --quiet --pidfile $PIDFILE --name $NAME
    RETVAL="$?"
    return "$RETVAL"
}

do_configtest() {
    if [ "$#" -ne 0 ]; then
        case "$1" in
            -q)
                FLAG=$1
                ;;
            *)
                ;;
        esac
        shift
    fi
    $DAEMON -t $FLAG -c $CONFFILE
    RETVAL="$?"
    return $RETVAL
}

do_upgrade() {
    OLDBINPIDFILE=$PIDFILE.oldbin

    do_configtest -q || return 6
    start-stop-daemon --stop --signal USR2 --quiet --pidfile $PIDFILE --name $NAME
    RETVAL="$?"
    sleep 1
    if [ -f $OLDBINPIDFILE -a -f $PIDFILE ]; then
        start-stop-daemon --stop --signal QUIT --quiet --pidfile $OLDBINPIDFILE --name $NAME
        RETVAL="$?"
    else
        echo $"Upgrade failed!"
        RETVAL=1
        return $RETVAL
    fi
}

case "$1" in
    start)
        [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
        do_start
        case "$?" in
            0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
            2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
        esac
        ;;
    stop)
        [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
        do_stop
        case "$?" in
            0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
            2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
        esac
        ;;
  status)
        status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
        ;;
  configtest)
        do_configtest
        ;;
  upgrade)
        do_upgrade
        ;;
  reload|force-reload)
        log_daemon_msg "Reloading $DESC" "$NAME"
        do_reload
        log_end_msg $?
        ;;
  restart|force-reload)
        log_daemon_msg "Restarting $DESC" "$NAME"
        do_configtest -q || exit $RETVAL
        do_stop
        case "$?" in
            0|1)
                do_start
                case "$?" in
                    0) log_end_msg 0 ;;
                    1) log_end_msg 1 ;; # Old process is still running
                    *) log_end_msg 1 ;; # Failed to start
                esac
                ;;
            *)
                # Failed to stop
                log_end_msg 1
                ;;
        esac
        ;;
    *)
        echo "Usage: $SCRIPTNAME {start|stop|status|restart|reload|force-reload|upgrade|configtest}" >&2
        exit 3
        ;;
esac

exit $RETVAL

Restarting nginx: nginxnginx: invalid option: "rapidzona.com.ua"

Just add.

server {
    listen 127.0.0.1;
    server_name rapidzona.com.ua;
    location /nginx_status {
            stub_status on;
            access_log   off;
            allow 127.0.0.1;
            deny all;
        }
    }

/etc/init.d/nginx restart
Restarting nginx: nginxnginx: invalid option: "rapidzona.com.ua"
root@vh1:/# /etc/init.d/nginx restart

nginx 1.4.2 of nginx.org - works fine.

[Feature Request] Add LDAP support

I would love if you added the Nginx LDAP module which is maintained here: https://github.com/kvspb/nginx-auth-ldap - even to nginx-extras

I have been recompiling your deb's for Squeeze for about a year to include this module and it works as expected.

I think (hope) LDAP is not too uncommon to include? Surely I am not the only one using LDAP HTTP auth with Nginx on Debian, as many do with Apache :)

redirect loop /w proxy + v1.2.7

(i do not know if this is a problem spcific to this package or if i should report this upstream, so i first try here :-))

I have been running nginx v1.2.5-1dotdeb.0 on debian 6.0.7/2.6.32-5-amd64 from some time, now upgraded to v1.2.7-1dotdeb.1.

I host some domains, some are configured individually, some via catch-all and then proxied.

  • all domains: without prefix: redirect (301) to www.${DOMAIN}, server_name: ${DOMAIN}
  • Domains A, B, C: individual configs, server_name: www.${DOMAIN}, some served via php-fpm, some via proxy/apache
  • Domains D, E, F: one config, server_name: _;, proxy to apache

As soon as i install v1.2.7-1~dotdeb.1 i get a redirect-loop accessing domains D, E, F...
Any hints/ideas/...?

nginx-extras doesnt properly purge

Here is my purge command

root@s2:~# aptitude purge nginx
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

root@s2:~# aptitude purge nginx-extras
The following packages will be REMOVED:
  libgd2-noxpm{u} libjpeg62{u} liblua5.1-0{u} libperl5.10{u} libxslt1.1{u} nginx-common{u} nginx-extras{p}
0 packages upgraded, 0 newly installed, 7 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 3,266 kB will be freed.
Do you want to continue? [Y/n/?] y
(Reading database ... 32466 files and directories currently installed.)
Removing nginx-extras ...
Stopping nginx: nginx.
(Reading database ... 32456 files and directories currently installed.)
Removing libgd2-noxpm ...
Removing libjpeg62 ...
Removing liblua5.1-0 ...
Removing libperl5.10 ...
Removing libxslt1.1 ...
Removing nginx-common ...
Processing triggers for man-db ...

When the package is purged the following is leftover.

/etc/nginx
/etc/default/nginx
/etc/init.d/nginx
/etc/logrotate.d/nginx
/etc/nginx/sites-available
/etc/rc0.d/K01nginx
/etc/rc1.d/K01nginx
/etc/rc2.d/S18nginx
/etc/rc3.d/S18nginx
/etc/rc4.d/S18nginx
/etc/rc5.d/S18nginx
/etc/rc6.d/K01nginx
/etc/ufw/applications.d/nginx
/var/lib/nginx
/var/lib/nginx/body
/var/lib/nginx/fastcgi
/var/lib/nginx/proxy
/var/lib/nginx/scgi
/var/lib/nginx/uwsgi
/var/lib/update-rc.d/nginx

The problem created by this is that after purging and reinstalling it wont regenerate the default set of config files as the install script tries to non-stomp.

After removing the above files manually it works.

Here is a quick bash script I wrote for manually purging.

#!/bin/bash

echo -n "Purging nginx-extras... "
rm -rf /etc/nginx
rm -f /etc/default/nginx
rm -f /etc/init.d/nginx
rm -f /etc/logrotate.d/nginx
rm -f /etc/ufw/applications.d/nginx
rm -rf /var/lib/nginx
rm -rf /var/log/nginx*
rm -f /var/lib/update-rc.d/nginx
rm -f /var/lib/dpkg/info/nginx*
rm -f /etc/rc*.d/*nginx
echo "done"

Below is the output of a desired purge run after using my included script.

root@s2:~# ls -l /etc/nginx
total 60
drwxr-xr-x 2 root root 4096 Dec 12 05:40 conf.d
-rw-r--r-- 1 root root  898 Dec 12 05:34 fastcgi_params
-rw-r--r-- 1 root root 2258 Dec 12 05:34 koi-utf
-rw-r--r-- 1 root root 1805 Dec 12 05:34 koi-win
-rw-r--r-- 1 root root 2085 Dec 12 05:34 mime.types
-rw-r--r-- 1 root root 5027 Dec 12 05:34 naxsi_core.rules
-rw-r--r-- 1 root root  287 Dec 12 05:34 naxsi.rules
-rw-r--r-- 1 root root 1605 Dec 12 05:34 nginx.conf
-rw-r--r-- 1 root root  131 Dec 12 05:34 proxy_params
-rw-r--r-- 1 root root  465 Dec 12 05:34 scgi_params
drwxr-xr-x 2 root root 4096 Feb 12 18:13 sites-available
drwxr-xr-x 2 root root 4096 Dec 12 05:40 sites-enabled
-rw-r--r-- 1 root root  532 Dec 12 05:34 uwsgi_params
-rw-r--r-- 1 root root 3071 Dec 12 05:34 win-utf
root@s2:~#
root@s2:~#
root@s2:~# aptitude -y purge nginx-extras
The following packages will be REMOVED:
  libgd2-noxpm{u} libjpeg62{u} liblua5.1-0{u} libperl5.10{u} libxslt1.1{u} nginx-common{u} nginx-extras{p}
0 packages upgraded, 0 newly installed, 7 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 3,266 kB will be freed.
(Reading database ... 32466 files and directories currently installed.)
Removing nginx-extras ...
Stopping nginx: nginx.
(Reading database ... 32456 files and directories currently installed.)
Removing libgd2-noxpm ...
Removing libjpeg62 ...
Removing liblua5.1-0 ...
Removing libperl5.10 ...
Removing libxslt1.1 ...
Removing nginx-common ...
Processing triggers for man-db ...

root@s2:~# ls -l /etc/nginx
total 52
-rw-r--r-- 1 root root  898 Dec 12 05:34 fastcgi_params
-rw-r--r-- 1 root root 2258 Dec 12 05:34 koi-utf
-rw-r--r-- 1 root root 1805 Dec 12 05:34 koi-win
-rw-r--r-- 1 root root 2085 Dec 12 05:34 mime.types
-rw-r--r-- 1 root root 5027 Dec 12 05:34 naxsi_core.rules
-rw-r--r-- 1 root root  287 Dec 12 05:34 naxsi.rules
-rw-r--r-- 1 root root 1605 Dec 12 05:34 nginx.conf
-rw-r--r-- 1 root root  131 Dec 12 05:34 proxy_params
-rw-r--r-- 1 root root  465 Dec 12 05:34 scgi_params
drwxr-xr-x 2 root root 4096 Feb 12 18:13 sites-available
-rw-r--r-- 1 root root  532 Dec 12 05:34 uwsgi_params
-rw-r--r-- 1 root root 3071 Dec 12 05:34 win-utf
root@s2:~# ./purge_nginx_extras.sh
Purging nginx-extras... done
root@s2:~# aptitude clean
root@s2:~# ls -l /etc/nginx
ls: cannot access /etc/nginx: No such file or directory
root@s2:~# aptitude -y install nginx-extras
The following NEW packages will be installed:
  libgd2-noxpm{a} libjpeg62{a} liblua5.1-0{a} libperl5.10{a} libxslt1.1{a} nginx-common{a} nginx-extras
0 packages upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,395 kB of archives. After unpacking 3,266 kB will be used.
Get:1 http://mirror.us.leaseweb.net/dotdeb/ squeeze/all nginx-common all 1.2.6-1~dotdeb.0 [75.5 kB]
Get:2 http://security.debian.org/ squeeze/updates/main libperl5.10 amd64 5.10.1-17squeeze4 [1,154 B]
Get:3 http://security.debian.org/ squeeze/updates/main libxslt1.1 amd64 1.1.26-6+squeeze2 [249 kB]
Get:4 http://mirror.us.leaseweb.net/dotdeb/ squeeze/all nginx-extras amd64 1.2.6-1~dotdeb.0 [658 kB]
Get:5 http://mirrors.xmission.com/debian/ squeeze/main libjpeg62 amd64 6b1-1 [94.0 kB]
Get:6 http://mirrors.xmission.com/debian/ squeeze/main libgd2-noxpm amd64 2.0.36~rc1~dfsg-5 [229 kB]
Get:7 http://mirrors.xmission.com/debian/ squeeze/main liblua5.1-0 amd64 5.1.4-5 [88.7 kB]
Fetched 1,395 kB in 3s (435 kB/s)
Selecting previously deselected package libjpeg62.
(Reading database ... 32378 files and directories currently installed.)
Unpacking libjpeg62 (from .../libjpeg62_6b1-1_amd64.deb) ...
Selecting previously deselected package libgd2-noxpm.
Unpacking libgd2-noxpm (from .../libgd2-noxpm_2.0.36~rc1~dfsg-5_amd64.deb) ...
Selecting previously deselected package liblua5.1-0.
Unpacking liblua5.1-0 (from .../liblua5.1-0_5.1.4-5_amd64.deb) ...
Selecting previously deselected package libperl5.10.
Unpacking libperl5.10 (from .../libperl5.10_5.10.1-17squeeze4_amd64.deb) ...
Selecting previously deselected package libxslt1.1.
Unpacking libxslt1.1 (from .../libxslt1.1_1.1.26-6+squeeze2_amd64.deb) ...
Selecting previously deselected package nginx-common.
Unpacking nginx-common (from .../nginx-common_1.2.6-1~dotdeb.0_all.deb) ...
Selecting previously deselected package nginx-extras.
Unpacking nginx-extras (from .../nginx-extras_1.2.6-1~dotdeb.0_amd64.deb) ...
Processing triggers for man-db ...
Setting up libjpeg62 (6b1-1) ...
Setting up libgd2-noxpm (2.0.36~rc1~dfsg-5) ...
Setting up liblua5.1-0 (5.1.4-5) ...
Setting up libperl5.10 (5.10.1-17squeeze4) ...
Setting up libxslt1.1 (1.1.26-6+squeeze2) ...
Setting up nginx-common (1.2.6-1~dotdeb.0) ...
Setting up nginx-extras (1.2.6-1~dotdeb.0) ...

root@s2:~# ls -l /etc/nginx
total 60
drwxr-xr-x 2 root root 4096 Dec 12 05:40 conf.d
-rw-r--r-- 1 root root  898 Dec 12 05:34 fastcgi_params
-rw-r--r-- 1 root root 2258 Dec 12 05:34 koi-utf
-rw-r--r-- 1 root root 1805 Dec 12 05:34 koi-win
-rw-r--r-- 1 root root 2085 Dec 12 05:34 mime.types
-rw-r--r-- 1 root root 5027 Dec 12 05:34 naxsi_core.rules
-rw-r--r-- 1 root root  287 Dec 12 05:34 naxsi.rules
-rw-r--r-- 1 root root 1605 Dec 12 05:34 nginx.conf
-rw-r--r-- 1 root root  131 Dec 12 05:34 proxy_params
-rw-r--r-- 1 root root  465 Dec 12 05:34 scgi_params
drwxr-xr-x 2 root root 4096 Feb 12 18:14 sites-available
drwxr-xr-x 2 root root 4096 Dec 12 05:40 sites-enabled
-rw-r--r-- 1 root root  532 Dec 12 05:34 uwsgi_params
-rw-r--r-- 1 root root 3071 Dec 12 05:34 win-utf

I believe that at least some of the commands from my script need to be added to the postrm.sh under the purge section.

Let me know if I am crazy here.

Thanks

New nginx-extra package uses ipv6 by default and will not bind

After purging and reinstalling (see #17 for complete purging) The new default config tries to bind to ipv6 ::80 and for me this failed on a few machines.

Setting up nginx-extras (1.2.7-1~dotdeb.1) ...
Restarting Services ... nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()

I dont believe this should be the default behavior as it doesnt seem to work out of the box on some machines.

Thanks

Apt-get warnings with 'packages cannot be authenticated!'

apt-get install nginx-full
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libxslt1.1
The following NEW packages will be installed:
libxslt1.1 nginx-full
0 upgraded, 2 newly installed, 0 to remove and 28 not upgraded.
Need to get 710 kB of archives.
After this operation, 1,459 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
nginx-full
Install these packages without verification [y/N]? y
Get:1 http://packages.dotdeb.org/ stable/all nginx-full amd64 1.2.7-1~dotdeb.1 [461 kB]

Same happens for all nginx-related packages.

apt-key list shows:

pub   4096R/89DF5277 2010-07-11
uid                  Guillaume Plessis [email protected]
sub   4096R/3D624A3B 2010-07-11
sub   4096R/A2098A6E 2010-07-11

Does it use a different key?

old mime.types

Hi, it looks like some of the config files in wheezy/debian/conf are really old. eg mime.types

The latest upstream versions in wheezy/conf do not seem to be used.

php5-fpm broken with nginx 1.8 on wheezy

i just installed nginx 1.8 and my site broke.

I found that from the new fastcgi_params file, SCRIPT_FILENAME is missing which is required for fpm.

As i see here:

fastcgi_params whitespace, removed SCRIPT_FILENAME

debian package maintainers removed the this distro-extra-included line from the default config which now synced with dotdeb-nginx.

So there is two way of solving this problem:
2) Always define SCRIPT_FILENAME parameter in your config, like this:

    location ~ ^/index\.php(/|$) {
            fastcgi_split_path_info ^(.+\.php)(.*)$;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            include fastcgi_params;
            fastcgi_param SCRIPT_FILENAME $request_filename;
    }
  1. Put back the line
fastcgi_param   SCRIPT_FILENAME         $request_filename;

to your fastcgi_params file.

Feature Request: add the fancy index module

I Mirror various linux bits over at mirror.stshosting.co.uk, now when i used to mirror with apache the various Distributions would have there own header and footer html that would be loaded automatically with no extra configuration required. however this is not possible with the current nginx modules compiled in by dotdeb

please can you consider adding this module to the nginx-extras package so that we can utilise it and get this functionality back again

Module references:
Nginx Wiki: http://wiki.nginx.org/NgxFancyIndex
Source: http://gitorious.org/ngx-fancyindex

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.