Cannot install any theme I am new to Drupal and am facing an issue where any theme that I try to install will fail with the following message:
Installing light_skeleton
An error has occurred.
Please continue to the error page

An AJAX HTTP error occurred.
HTTP Result Code: 403
Debugging information follows.
Path: /core/authorize.php/core/authorize.php?batch=1&amp;id=4&amp;op=do_nojs&amp;op=do
StatusText: Forbidden
ResponseText: 
403 Forbidden
403 Forbidden
nginx/1.9.10

The root folder is owned by www-data:www-data and I have given the directory 775 permissions. I have also tried to give it a full access using chmod 777 but without success.
I have checked the logs of nginx and php but there are no errors displayed. The site itself, using the standard theme, works without any issues.
After getting the error, I get:
Notice: Undefined index: log in update_authorize_install_batch_finished() (line 291 of core/modules/update/update.authorize.inc).
Warning: Invalid argument supplied for foreach() in update_authorize_install_batch_finished() (line 291 of core/modules/update/update.authorize.inc).
Notice: Undefined index: log in update_authorize_install_batch_finished() (line 332 of core/modules/update/update.authorize.inc).
Notice: Undefined index: tasks in update_authorize_install_batch_finished() (line 333 of core/modules/update/update.authorize.inc).
Installation failed! See the log below for more information.
This is an nginx configuration issue and discussed intensely on this page Yet curiously no solid solution could be offered. Some guy on an other page proposed a solution. I applied that proposed solution and can confirm that in works! 

To apply proposed solution go to your nginx configuration file under 

/etc/nginx/sites-available/ directory on Ubuntu and add

rewrite ^/core/authorize.php/core/authorize.php(.*)$ /core/authorize.php$1;


just above the 

location ~ \..*/.*\.php$ {
    return 403;
}


block. Location does matter!.. Restart your server:


  sudo service nginx restart


and that's it. The problem solved!