Обновление WordPress

Чтобы можно было зайти по ssh – не обязательно вводить ключ! Достаточно только логина и пароля.

Чтобы все обновлялось:

chown www-data:www-data  -R * # Let Apache be owner
find . -type d -exec chmod 755 {} \;  # Change directory permissions rwxr-xr-x
find . -type f -exec chmod 644 {} \;  # Change file permissions rw-r--r--

Codeigniter в подпапке nginx

Got it working, the solution was to use $request_filename; instead of $document_root$fastcgi_script_name;


location /ci/ {
alias /var/www/ci/;
try_files $uri $uri/ /ci/index.php; #important!

location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_pass backend;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename; #important!
}
}

location ~ \.php$ could be outside location /ci/ block.

HTTPS NGINX CloudFlare

server {
  listen 80 default_server;
  listen [::]:80 default_server;
  server_name mydomain.com www.mydomain.com;

  if ($http_x_forwarded_proto = "http") {
      return 301 https://$server_name$request_uri;
  }

  root /var/www/html;

  index index.php index.html index.htm index.nginx-debian.html;

  location / {
     try_files $uri $uri/ =404;
  }

  location ~ \.php$ {
     include snippets/fastcgi-php.conf;
     fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  }

  location ~ /\.ht {
     deny all;
  }
}

Источник: https://stackoverflow.com/questions/41583088/http-to-https-nginx-too-many-redirects