0E800 running the first script you provided, most things work, although I did get the following error:
Created project in /var/www/[****removed for privacy****]
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing tobscure/json-api (v0.3.0)
Downloading: 100%
The following exception is caused by a lack of memory and not having swap configured
Check https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors for details
PHP Fatal error: Uncaught ErrorException: proc_open(): fork failed - Cannot allocate memory in /usr/share/php/Symfony/Component/Console/Application.php:943
Stack trace:
#0 [internal function]: Composer\Util\ErrorHandler::handle(2, 'proc_open(): fo...', '/usr/share/php/...', 943, Array)
#1 /usr/share/php/Symfony/Component/Console/Application.php(943): proc_open('stty -a | grep ...', Array, NULL, NULL, NULL, Array)
#2 /usr/share/php/Symfony/Component/Console/Application.php(751): Symfony\Component\Console\Application->getSttyColumns()
#3 /usr/share/php/Symfony/Component/Console/Application.php(712): Symfony\Component\Console\Application->getTerminalDimensions()
#4 /usr/share/php/Symfony/Component/Console/Application.php(645): Symfony\Component\Console\Application->getTerminalWidth()
#5 /usr/share/php/Symfony/Component/Console/Application.php(127): Symfony\Component\Console\Application->renderException(Object(ErrorException), Object(Symfony\Component\Console\Output\StreamOutput))
#6 /usr/share/php/Composer/Console/Application.ph in /usr/share/php/Symfony/Component/Console/Application.php on line 943
Fatal error: Uncaught ErrorException: proc_open(): fork failed - Cannot allocate memory in /usr/share/php/Symfony/Component/Console/Application.php:943
Stack trace:
#0 [internal function]: Composer\Util\ErrorHandler::handle(2, 'proc_open(): fo...', '/usr/share/php/...', 943, Array)
#1 /usr/share/php/Symfony/Component/Console/Application.php(943): proc_open('stty -a | grep ...', Array, NULL, NULL, NULL, Array)
#2 /usr/share/php/Symfony/Component/Console/Application.php(751): Symfony\Component\Console\Application->getSttyColumns()
#3 /usr/share/php/Symfony/Component/Console/Application.php(712): Symfony\Component\Console\Application->getTerminalDimensions()
#4 /usr/share/php/Symfony/Component/Console/Application.php(645): Symfony\Component\Console\Application->getTerminalWidth()
#5 /usr/share/php/Symfony/Component/Console/Application.php(127): Symfony\Component\Console\Application->renderException(Object(ErrorException), Object(Symfony\Component\Console\Output\StreamOutput))
#6 /usr/share/php/Composer/Console/Application.ph in /usr/share/php/Symfony/Component/Console/Application.php on line 943
writing php7-fpm config
writing nginx config
* Testing nginx configuration [ OK ]
Enter mysql root password mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
I noticed the 'default' virtual host was still inside the nginx 'sites-enabled' folder. So I removed that one. Then I started getting 500 errors from nginx:
2017/03/23 19:24:04 [error] 27847#27847: *10 FastCGI sent in stderr: "PHP message: PHP Warning: require(vendor/autoload.php): failed to open stream: No such file or directory in /var/www/****removed for privacy****/index.php on line 12
PHP message: PHP Fatal error: require(): Failed opening required 'vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www/****removed for privacy****/index.php on line 12" while reading response header from upstream, client: ****removed for privacy****, server: ****removed for privacy****, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php7-fpm.****removed for privacy****.sock:", host: "****removed for privacy****"
Any suggestions?