Upgrading nginx doesn't work


Hi, Was a long time for me here as I started a new work, new computer (mine broke of course at the worst moment) and a new home without good internet connection). All of these must also be main reasons of my problems here as I didn’t look at updates since a long time. (yeah my great fault) What is installed for now: Nginx-full as nginx-custom doesn’t want to install (see below); percona-server 'don’t know what sql server is recommended, should I migrate to mariadb with the migrate command?) no hhvm (I don’t really know what it is), php5 and postfix First of all is for me impossible now to upgrade nginx with this error:

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-custom : Depends: nginx-common (= 1.8.1-1ppa) but 1.8.1-1+trusty0 is to be installed E: Unable to correct problems, you have held broken packages. 2016-03-07 18:01:31,095 (INFO) ee : Oops Something went wrong!! 2016-03-07 18:01:31,096 (ERROR) ee : Check logs for reason tail /var/log/ee/ee.log & Try Again!!!

Somehow few of my websites are available, but most of them like http://memoiresdutravail.fr just give a 200 response with a blank page some of others like http://dialoguestheatre.fr doesn’t display the login page (kind of a problem to update them…) Hopefully most of my clients are friends, but it’s already almost two weeks of unavailable pages… Since then I tried several things to make it works but without results, and I don’t really have a lot of time and only 3G connection to look at…

here is an example of config file which work:

server {
server_name www.perso.youm.org perso.youm.org;
rewrite ^ http://blog.youm.org$request_uri? permanent;

server {
server_name blog.youm.org www.blog.youm.org;
root /var/www/blog.youm.org/htdocs;
index index.php;
access_log   /var/log/nginx/blog.youm.org.access.log ;
error_log    /var/log/nginx/blog.youm.org.error.log;
include common/w3tc.conf;
include /var/www/blog.youm.org/nginx.conf;
include common/locations.conf;
include common/wpcommon.conf;
server {
listen 443 ssl;
server_name www.blog.youm.org www.perso.youm.org perso.youm.org;
rewrite ^ https://blog.youm.org$request_uri? permanent;
ssl_certificate /var/www/blog.youm.org/.ssl/blog.youm.org.crt;
ssl_certificate_key /var/www/blog.youm.org/.ssl/blog.youm.org.key;
server {
listen 443 ssl;
server_name blog.youm.org;
index index.php;
root /var/www/blog.youm.org/htdocs;
ssl_certificate /var/www/blog.youm.org/.ssl/blog.youm.org.crt;
ssl_certificate_key /var/www/blog.youm.org/.ssl/blog.youm.org.key;
access_log /var/log/nginx/blog.youm.org.log;
error_log /var/log/nginx/blog.youm.org.log;
include common/locations.conf;
include common/wpcommon.conf;
include common/w3tc.conf;
include /var/www/blog.youm.org/nginx.conf;
rewrite ^/sitemap_index\.xml$ /index.php?sitemap=1 last;
rewrite ^/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;

And one which doesn’t work:

server {
server_name memoiresdutravail.fr www.memoiresdutravail.fr;
root /var/www/memoiresdutravail.fr/htdocs;
index index.php index.html;
access_log   /var/log/nginx/memoiresdutravail.fr.access.log rt_cache;
error_log    /var/log/nginx/memoiresdutravail.fr.error.log;
include common/w3tc.1.conf;
include common/locations.conf;
include common/sitemap.conf;
include /var/www/memoiresdutravail.fr/nginx.conf;
include common/wpcommon.conf;

Where w3tc.1.conf is juste a rewrite of original w3tc.conf for websites where I changed the name of “wp-content” folder into “contenu”, here it is:

set $cache_uri $request_uri;
# POST requests and URL with a query string should always go to php
if ($request_method = POST) {
set $cache_uri 'null cache';
if ($query_string != "") {
set $cache_uri 'null cache';
# Don't cache URL containing the following segments
if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|wp-.*.php|index.php|/feed/|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") {
set $cache_uri 'null cache';

# Don't use the cache for logged in users or recent commenter
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_logged_in") ;
set $cache_uri 'null cache';

# Use cached or actual file if they exists, Otherwise pass request to WordPress
location / {
try_files /contenu/cache/page_enhanced/${host}${cache_uri}_index.html $uri $uri/ /index.php?$args;
location ~ ^/contenu/cache/minify/(.+\.(css|js))$ {
try_files $uri /contenu/plugins/w3-total-cache/pub/minify.php?file=$1;
location ~ \.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass hhvm;

Lastly here is my nginx general conf file:

user www-data;
worker_processes auto;
worker_rlimit_nofile 100000;
pid /run/nginx.pid;
events {
worker_connections 4096;
multi_accept on;

http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 30;
types_hash_max_size 2048;
server_tokens off;
reset_timedout_connection on;
add_header rt-Fastcgi-Cache $upstream_cache_status;
limit_req_status 403;
limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;

fastcgi_read_timeout 300;
client_max_body_size 100m;
ssl_session_cache shared:SSL:20m;
ssl_session_timeout 10m;
ssl_prefer_server_ciphers on;
ssl_ciphers HIGH:!aNULL:!MD5:!kEDH;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
log_format rt_cache '$remote_addr $upstream_response_time $upstream_cache_status [$time_local] '
'$http_host "$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;

error.log is not so explicit: (extract)

2016/03/07 17:40:00 [emerg] 28481#0: duplicate location "/" in /etc/nginx/common/php.conf:4

And memoiresdutravail.fr.error.log.1: (as the without .1 is empty)

2016/02/27 13:36:42 [error] 1359#0: *148699 limiting requests, excess: 1.211 by zone "one", client:, server: memoiresdutravail.fr, request: "G$
2016/02/29 03:42:56 [error] 1362#0: *223289 access forbidden by rule, client:, server: memoiresdutravail.fr, request: "GET /wp-config.php~ HTT$

Hope it can help you to help me… I don’t know what file could help you, in any case just ask for them…