Vvv: Nginx certificate error on fresh install

Created on 20 Mar 2020  ยท  10Comments  ยท  Source: Varying-Vagrant-Vagrants/VVV

What was The Command Used To Provision

vagrant up --provision

What Kind of VVV Provision Was This

This was a fresh install

Logs/What Broke

When I do a fresh install and on the first provision I get the nginx error seen below. I have tried a fresh install more than once destroying the VM etc but I still have the problem. The only time I do not receive the problem is when I remove the 'tls-ca' utility but then I cannot access any of the local sites after that either.

`\ V\ V\ V / Varying Vagrant Vagrants
 \_/\_/\_/  v3.3.0-git::develop

Platform: platform-linux-gnu shell:/bin/bash systemd vagrant-hostsupdater CaseSensitiveFS shared_db_folder_disabled , VVV Path: "/home/jordan/vagrant-local"
Vagrant: v2.2.7, VirtualBox: v5.2.34_Ubuntur133883

Docs:       https://varyingvagrantvagrants.org/
Contribute: https://github.com/varying-vagrant-vagrants/vvv
Dashboard:  http://vvv.test

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/bionic64' version '20200317.0.0' is up to date...
==> default: [vagrant-hostsupdater] Checking for host entries
==> default: [vagrant-hostsupdater]   found entry for: 192.168.50.4 vvv
==> default: [vagrant-hostsupdater]   found entry for: 192.168.50.4 vvv.test
==> default: [vagrant-hostsupdater]   found entry for: 192.168.50.4 one.wordpress.test
==> default: [vagrant-hostsupdater]   found entry for: 192.168.50.4 two.wordpress.test
==> default: Running provisioner: file...
    default: /home/jordan/vagrant-local/version => /home/vagrant/version
==> default: Running provisioner: default (shell)...
    default: Running: /tmp/vagrant-shell20200320-32693-vla0a3.sh
    default:  * Beginning Main VVV Provisioner, if this is the first provision this may take a few minutes
    default:  * Testing network connection
    default:  * Succesful Network connection to ppa.launchpad.net detected...
    default:  * Bash profile setup and directories.
    default:  * Setting ownership of files in /home/vagrant to vagrant
    default:  * Copying /srv/config/bash_profile                      to /home/vagrant/.bash_profile
    default:  * Copying /srv/config/bash_aliases                      to /home/vagrant/.bash_aliases
    default:  * Copying /srv/config/bash_aliases                      to /root/.bash_aliases
    default:  * Copying /srv/config/vimrc                             to /home/vagrant/.vimrc
    default:  * Copying /srv/config/subversion-servers                to /home/vagrant/.subversion/servers
    default:  * Copying /srv/config/subversion-config                 to /home/vagrant/.subversion/config
    default:  * Copying /srv/config/ssh_known_hosts to /etc/ssh/ssh_known_hosts
    default:  * Copying /srv/config/sshd_config to /etc/ssh/sshd_config
    default:  * Reloading SSH Daemon
    default:  * Testing network connection
    default:  * Succesful Network connection to ppa.launchpad.net detected...
    default:  
    default:  * Main packages check and install.
    default:  * git-core/ppa already present, skipping
    default: 
    default:  * Setting up MySQL configuration file links...
    default:  * mysql group exists
    default:  * mysql user present and has uid 9001
    default: uid=9001(mysql) gid=9001(mysql) groups=9001(mysql),115(vboxsf)
    default:  * Copying /srv/config/mysql-config/vvv-core.cnf to /etc/mysql/conf.d/vvv-core.cnf
    default:  * Copying custom apt sources
    default:  * Checking Apt Keys
    default:  * Running apt-get update...
    default: Hit:1 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
    default: Hit:2 https://deb.nodesource.com/node_10.x bionic InRelease
    default: Hit:3 https://nginx.org/packages/mainline/ubuntu bionic InRelease
    default: Hit:4 http://ppa.launchpad.net/varying-vagrant-vagrants/php/ubuntu bionic InRelease
    default: Hit:6 http://archive.ubuntu.com/ubuntu bionic InRelease
    default: Get:7 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
    default: Hit:5 https://mirror.wtnet.de/mariadb/repo/10.3/ubuntu bionic InRelease
    default: Get:8 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
    default: Hit:9 http://security.ubuntu.com/ubuntu bionic-security InRelease
    default: Hit:10 https://packagecloud.io/github/git-lfs/ubuntu bionic InRelease
    default: Fetched 163 kB in 1s (154 kB/s)
    default: Reading package lists...
    default:  * Installing apt-get packages...
    default: Reading package lists...
    default: Building dependency tree...
    default: Reading state information...
    default: make is already the newest version (4.1-9.1ubuntu1).
    default: unzip is already the newest version (6.0-21ubuntu1).
    default: zip is already the newest version (3.0-11build1).
    default: colordiff is already the newest version (1.0.18-1).
    default: dos2unix is already the newest version (7.3.4-3).
    default: graphviz is already the newest version (2.40.1-2).
    default: ngrep is already the newest version (1.47+ds1-1).
    default: subversion is already the newest version (1.9.7-4ubuntu1).
    default: curl is already the newest version (7.58.0-2ubuntu3.8).
    default: g++ is already the newest version (4:7.4.0-1ubuntu2.3).
    default: gettext is already the newest version (0.19.8.1-6ubuntu0.3).
    default: git is already the newest version (1:2.17.1-1ubuntu0.5).
    default: imagemagick is already the newest version (8:6.9.7.4+dfsg-16ubuntu6.8).
    default: memcached is already the newest version (1.5.6-0ubuntu1.2).
    default: postfix is already the newest version (3.3.0-1ubuntu0.2).
    default: software-properties-common is already the newest version (0.96.24.32.12).
    default: vim is already the newest version (2:8.0.1453-1ubuntu1.1).
    default: git-svn is already the newest version (1:2.17.1-1ubuntu0.5).
    default: ntp is already the newest version (1:4.2.8p10+dfsg-5ubuntu7.1).
    default: ntpdate is already the newest version (1:4.2.8p10+dfsg-5ubuntu7.1).
    default: python-pip is already the newest version (9.0.1-2.3~ubuntu1.18.04.1).
    default: nginx is already the newest version (1.17.9-1~bionic).
    default: php-imagick is already the newest version (3.4.4-4+ubuntu18.04.1+deb.sury.org+1).
    default: php-memcache is already the newest version (4.0.5.2+3.0.9~20170802.e702b5f9-1+ubuntu18.04.1+deb.sury.org+1).
    default: php-memcached is already the newest version (3.1.4+2.2.0-1+ubuntu18.04.1+deb.sury.org+20191129).
    default: php-pear is already the newest version (1:1.10.8+submodules+notgz-1+ubuntu18.04.1+deb.sury.org+1).
    default: php-ssh2 is already the newest version (1.2+0.13-1+ubuntu18.04.1+deb.sury.org+1).
    default: php-xdebug is already the newest version (2.9.2+2.8.1+2.5.5-1+ubuntu18.04.1+deb.sury.org+1).
    default: php-yaml is already the newest version (2.0.4+1.3.2-1+ubuntu18.04.1+deb.sury.org+20191129).
    default: php7.2-bcmath is already the newest version (7.2.28-3+ubuntu18.04.1+deb.sury.org+1).
    default: php7.2-cli is already the newest version (7.2.28-3+ubuntu18.04.1+deb.sury.org+1).
    default: php7.2-common is already the newest version (7.2.28-3+ubuntu18.04.1+deb.sury.org+1).
    default: php7.2-curl is already the newest version (7.2.28-3+ubuntu18.04.1+deb.sury.org+1).
    default: php7.2-dev is already the newest version (7.2.28-3+ubuntu18.04.1+deb.sury.org+1).
    default: php7.2-fpm is already the newest version (7.2.28-3+ubuntu18.04.1+deb.sury.org+1).
    default: php7.2-gd is already the newest version (7.2.28-3+ubuntu18.04.1+deb.sury.org+1).
    default: php7.2-imap is already the newest version (7.2.28-3+ubuntu18.04.1+deb.sury.org+1).
    default: php7.2-json is already the newest version (7.2.28-3+ubuntu18.04.1+deb.sury.org+1).
    default: php7.2-mbstring is already the newest version (7.2.28-3+ubuntu18.04.1+deb.sury.org+1).
    default: php7.2-mysql is already the newest version (7.2.28-3+ubuntu18.04.1+deb.sury.org+1).
    default: php7.2-soap is already the newest version (7.2.28-3+ubuntu18.04.1+deb.sury.org+1).
    default: php7.2-xml is already the newest version (7.2.28-3+ubuntu18.04.1+deb.sury.org+1).
    default: php7.2-zip is already the newest version (7.2.28-3+ubuntu18.04.1+deb.sury.org+1).
    default: mariadb-server is already the newest version (1:10.3.22+maria~bionic).
    default: nodejs is already the newest version (10.19.0-1nodesource1).
    default: git-lfs is already the newest version (2.10.0).
    default: 0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
    default:  * Removing unnecessary packages...
    default: Reading package lists...
    default: Building dependency tree...
    default: 
    default: Reading state information...
    default: 0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
    default:  * Cleaning apt caches...
    default:  * Running tools_install
    default:  * Disabling active debug PHP mods
    default:  * Disabling if present: 'xdebug, xhgui, tideways_xhprof, pcov'
    default:  * Restarting PHP FPM's so the change takes effect
    default:  * Checking for NVM
    default:  * Installing/updating npm...
    default: /usr/bin/npm -> /usr/lib/node_modules/npm/bin/npm-cli.js
    default: /usr/bin/npx -> /usr/lib/node_modules/npm/bin/npx-cli.js
    default: + [email protected]
    default: updated 1 package in 4.493s
    default:  * Installing/updating npm-check-updates...
    default: npm 
    default: WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
    default: /usr/bin/npm-check-updates -> /usr/lib/node_modules/npm-check-updates/bin/npm-check-updates
    default: /usr/bin/ncu -> /usr/lib/node_modules/npm-check-updates/bin/ncu
    default: + [email protected]
    default: updated 1 package in 4.29s
    default:  * ack-grep already installed
    default:  * Making sure the composer cache is not owned by root
    default:  * Checking for Composer
    default:  * Updating Composer...
    default: Changed current directory to /usr/local/src/composer
    default: You are already using composer version 1.10.1 (stable channel).
    default: Changed current directory to /usr/local/src/composer
    default: ./composer.json has been updated
    default: Changed current directory to /usr/local/src/composer
    default: Loading composer repositories with package information
    default: Updating dependencies (including require-dev)
    default: Nothing to install or update
    default: Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
    default: Generating autoload files
    default:  * Updating Grunt CLI
    default:  * Updated Grunt CLI
    default:  * Adding graphviz symlink for Webgrind...
    default:  * Installing Shyaml for bash provisioning..
    default: Requirement already satisfied: shyaml in /usr/local/lib/python2.7/dist-packages
    default: Requirement already satisfied: pyyaml in /usr/local/lib/python2.7/dist-packages (from shyaml)
    default:  * Sign the certificate using the above private key...
    default: 
    default:  * Setup configuration files...
    default:  * Copying /srv/config/init/vvv-start.conf               to /etc/init/vvv-start.conf
    default: cp: 
    default: cannot create regular file '/etc/init/vvv-start.conf': No such file or directory
    default:  * Copying /srv/config/nginx-config/nginx.conf           to /etc/nginx/nginx.conf
    default:  * Copying /srv/config/nginx-config/nginx-wp-common.conf to /etc/nginx/nginx-wp-common.conf
    default:  * Copying /srv/config/nginx-config/php7.2-upstream.conf to /etc/nginx/upstreams/php72.conf
    default:  * Rsync'ing /srv/config/nginx-config/sites/             to /etc/nginx/custom-sites
    default: sending incremental file list
    default: deleting vvv-auto-wordpress-two-provision-b0bc8489c53c6b96847837cbb5a3ac4a.conf
    default: deleting vvv-auto-wordpress-one-provision-60730e707ede8a21f013860b6fc556e1.conf
    default: deleting vvv-auto-mysite-provision-f1abf87bc88a4d276195fe1bae8900b7.conf
    default: default.conf
    default: local-nginx-example.conf-sample
    default: sent 1.92K bytes  received 269 bytes  4.37K bytes/sec
    default: total size is 4.08K  speedup is 1.87
    default:  * Making sure the Nginx log files and folder exist
    default:  * Enabling MailHog Service
    default:  * Starting MailHog Service
    default:  * Copying /srv/config/php-config/php7.2-fpm.conf   to /etc/php/7.2/fpm/php-fpm.conf
    default:  * Copying /srv/config/php-config/php7.2-www.conf   to /etc/php/7.2/fpm/pool.d/www.conf
    default:  * Copying /srv/config/php-config/php7.2-custom.ini to /etc/php/7.2/fpm/conf.d/php-custom.ini
    default:  * Copying /srv/config/php-config/opcache.ini       to /etc/php/7.2/fpm/conf.d/opcache.ini
    default:  * Copying /srv/config/php-config/xdebug.ini        to /etc/php/7.2/mods-available/xdebug.ini
    default:  * Copying /srv/config/php-config/mailhog.ini       to /etc/php/7.2/mods-available/mailhog.ini
    default:  * Copying /srv/config/memcached-config/memcached.conf to /etc/memcached.conf and /etc/memcached_default.conf
    default: 
    default:  * Restarting services...
    default:  * Disabling XDebug PHP extension
    default:  * Enabling MailHog for PHP
    default: 
    default:  * Setting up database configuration file links...
    default:  * Copied /srv/config/mysql-config/my.cnf               to /etc/mysql/my.cnf
    default:  * Copied /srv/config/mysql-config/root-my.cnf          to /home/vagrant/.my.cnf
    default:  * Setting the default database password for the root user
    default: mysqladmin: connect to server at 'localhost' failed
    default: error: 'Access denied for user 'root'@'localhost' (using password: NO)'
    default:  * Restarting mysql service
    default: 
    default:  * No custom MySQL scripting found in database/init-custom.sql, skipping...
    default:  * Initial MySQL prep...
    default:  * Starting MariaDB Database Import
    default:  * No custom databases to import
    default:  * Testing network connection
    default:  * Succesful Network connection to ppa.launchpad.net detected...
    default:  
    default:  * Installing/updating wp-cli and debugging tools
    default:  * Updating wp-cli...
    default: Downloading from https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli-nightly.phar...
    default: md5 hash verified: 1cd88616ce15c4c348603b327fc9043a
    default: New version works. Proceeding to replace.
    default: Success: Updated WP-CLI to the latest nightly release.
    default: 
    default:  * Install/Update PHP_CodeSniffer (phpcs), see https://github.com/squizlabs/PHP_CodeSniffer
    default: 
    default:  * Install/Update WordPress-Coding-Standards, sniffs for PHP_CodeSniffer, see https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards
    default: Loading composer repositories with package information

    default: Updating dependencies (including require-dev)
    default: Nothing to install or update
    default: Using config file: /srv/www/phpcs/CodeSniffer.conf
    default: 
    default: Config value "installed_paths" updated successfully; old value was "./CodeSniffer/Standards/WordPress/,./CodeSniffer/Standards/VIP-Coding-Standards/,./CodeSniffer/Standards/PHPCompatibility/,./CodeSniffer/Standards/PHPCompatibilityParagonie/,./CodeSniffer/Standards/PHPCompatibilityWP/"
    default: Using config file: /srv/www/phpcs/CodeSniffer.conf
    default: 
    default: Config value "default_standard" updated successfully; old value was "WordPress-Core"
    default: The installed coding standards are PSR12, Zend, MySource, PSR1, PSR2, PEAR, Squiz, WordPress-Core, WordPress-Docs, WordPress-Extra, WordPress, WordPressVIPMinimum, WordPress-VIP-Go, PHPCompatibility, PHPCompatibilityParagonieSodiumCompat, PHPCompatibilityParagonieRandomCompat and PHPCompatibilityWP
    default:  * Testing network connection
    default:  * Succesful Network connection to ppa.launchpad.net detected...
    default:  
    default:  * Searching for SVN repositories that need upgrading
    default:  
    default:  * Cleaning up Nginx configs
    default:  * Cleaning the virtual machine's /etc/hosts file...
    default:  -----------------------------
    default:  * Provisioning complete in 32 seconds
    default:  * For further setup instructions, visit http://vvv.test
==> default: Running provisioner: dashboard (shell)...
    default: Running: /tmp/vagrant-shell20200320-32693-1yr6evo.sh
    default:  * Updating dashboard on the 'master' branch...
==> default: Running provisioner: utility-source-core (shell)...
    default: Running: /tmp/vagrant-shell20200320-32693-82tyst.sh
    default:  * Updating the "core" utility on the "master" branch...
==> default: Running provisioner: utility-core-tls-ca (shell)...
    default: Running: /tmp/vagrant-shell20200320-32693-116vqx9.sh
    default:  * Running utility provisioner for 'core/tls-ca'
    default:  * The 'core/tls-ca' provisioner completed in 1 seconds
==> default: Running provisioner: utility-core-phpmyadmin (shell)...
    default: Running: /tmp/vagrant-shell20200320-32693-1lw3jpj.sh
    default:  * Running utility provisioner for 'core/phpmyadmin'
    default:  * The 'core/phpmyadmin' provisioner completed in 0 seconds
==> default: Running provisioner: site-wordpress-one (shell)...
    default: Running: /tmp/vagrant-shell20200320-32693-1r5ehbw.sh
    default:  * Running provisioner for site wordpress-one
    default:  * Updating wordpress-one in /srv/www/wordpress-one...
    default:  * Searching for a site template provisioner, vvv-init.sh
    default:  * Found vvv-init.sh at /srv/www/wordpress-one/provision/vvv-init.sh
    default:  * Script output will be logged to: log/provisioners/2020.03.20_00-03-01/provisioner-site-wordpress-one.log
    default:  * Site provisioner script finished successfully
    default:  * Adding domains to the virtual machine's /etc/hosts file...
    default:  * Adding hosts from the VVV config entry
    default:    - Added one.wordpress.test from /vagrant/config.yml
    default:  * Reloading Nginx
    default:  * wordpress-one provisioning finished in 3 seconds
==> default: Running provisioner: site-wordpress-two (shell)...
    default: Running: /tmp/vagrant-shell20200320-32693-1wayr8e.sh
    default:  * Running provisioner for site wordpress-two
    default:  * Updating wordpress-two in /srv/www/wordpress-two...
    default:  * Searching for a site template provisioner, vvv-init.sh
    default:  * Found vvv-init.sh at /srv/www/wordpress-two/provision/vvv-init.sh
    default:  * Script output will be logged to: log/provisioners/2020.03.20_00-03-01/provisioner-site-wordpress-two.log
    default: Warning: query-monitor: Plugin already installed.
    default: Warning: Plugin 'query-monitor' is already active.
    default:  * Site provisioner script finished successfully
    default:  * Adding domains to the virtual machine's /etc/hosts file...
    default:  * Adding hosts from the VVV config entry
    default:    - Added two.wordpress.test from /vagrant/config.yml
    default:  * Reloading Nginx
    default:  * wordpress-two provisioning finished in 4 seconds
==> default: Running action triggers after up ...
==> default: Running trigger: VVV Post-Up...
    default: Running: inline script
    default: Post Vagrant up script
    default: Restarting Nginx and MySQL
    default: Job for nginx.service failed because the control process exited with error code.
    default: See "systemctl status nginx.service" and "journalctl -xe" for details.
    default: 
    default:          yay  
    default:    โ–„โ–€โ–€โ–€โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–€โ–€โ–€โ–„                __ __ __ __
    default:    โ–ˆโ–’โ–’โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–’โ–’โ–ˆ    Thanks for  \ V\ V\ V /
    default:     โ–ˆโ–‘โ–‘โ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–ˆโ–‘โ–‘โ–ˆ     using        \_/\_/\_/
    default:  โ–„โ–„  โ–ˆโ–‘โ–‘โ–‘โ–€โ–ˆโ–€โ–‘โ–‘โ–‘โ–ˆ  โ–„โ–„ 
    default: โ–ˆโ–‘โ–‘โ–ˆ โ–€โ–„โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–„โ–€ โ–ˆโ–‘โ–‘โ–ˆ Vagrant Up has finished! Visit http://vvv.test
    default: 
`

Also, your config/config.yml would be super handy -->

---

# This file is a YAML formatted file. YAML indenting is done in spaces not
# tabs, and whitespace is significant. If you don't stick to this, it will
# fail on provision

#
# IMPORTANT, if you change this file, you have to reprovision,  no exceptions
# Do this by running either this command:
# vagrant reload --provision

# Or, if your machine is already turned on:
# vagrant provision
#

# These are your websites, and their names map on to the folders they're
# located in. See the docs for how to define these, and what all the keys
# and options are
sites:

  # latest version of WordPress, can be used for client work and testing
  # Check the readme at https://github.com/Varying-Vagrant-Vagrants/custom-site-template
  wordpress-one:
    skip_provisioning: false
    description: "A standard WP install, useful for building plugins, testing things, etc"
    repo: https://github.com/Varying-Vagrant-Vagrants/custom-site-template.git
    hosts:
      - one.wordpress.test
    custom:
      wpconfig_constants:
        WP_DEBUG: true
        WP_DEBUG_LOG: true
        WP_DISABLE_FATAL_ERROR_HANDLER: true # To disable in WP 5.2 the FER mode

  wordpress-two:
    skip_provisioning: false
    description: "A standard WP install, useful for building plugins, testing things, etc"
    repo: https://github.com/Varying-Vagrant-Vagrants/custom-site-template.git
    custom:
      # locale: it_IT
      delete_default_plugins: true
      install_plugins:
        - query-monitor
    hosts:
      - two.wordpress.test

  # The following commented out site configuration will create a standard WordPress
  # site in www/example-site/ available at http://mysite.test.
  # Remember, whitespace is significant! Tabs and spaces mean different things
  #mysite:
  #  description: "My website"
  #  repo: https://github.com/Varying-Vagrant-Vagrants/custom-site-template.git
  #  hosts:
  #    - mysite.test

  # The wordpress-develop configuration is useful for contributing to WordPress Core.
  # It uses the built WP to serve the site
  wordpress-trunk:
    skip_provisioning: true # provisioning this one takes longer, so it's disabled by default
    description: "An svn based WP Core trunk dev setup, useful for contributor days, Trac tickets, patches"
    repo: https://github.com/Varying-Vagrant-Vagrants/custom-site-template-develop.git
    hosts:
      - trunk.wordpress.test

  # The following commented out site configuration will create a environment useful
  # for contributions to the WordPress meta team, .e.g WordCamps, .org, etc:
  wordpress-meta-environment:
    skip_provisioning: true # disabled by default, this takes a long time to provision
    description: "An environment useful for contributions to the WordPress meta team."
    repo: https://github.com/WordPress/meta-environment.git
    hosts:
      - wp-meta.test
    custom:
      provision_site:
        "buddypressorg.test": true
        "jobs.wordpressnet.test": true
        "wordcamp.test": true
        "wordpressorg.test": true
        "wordpresstv.test": true

  # The following commented out site configuration will create a standard WordPress
  # site in www/example-site/ available at http://my-example-site.test.
  # Remember, whitespace is significant! Tabs and spaces mean different things
  #example-site:
  #  repo: https://github.com/Varying-Vagrant-Vagrants/custom-site-template.git
  #  hosts:
  #    - my-example-site.test

# Utilities https://varyingvagrantvagrants.org/docs/en-US/utilities/
# are system level items that aren't websites, that install tools or packages
# the core utilities install tools such as phpmyadmin
utilities:
  core: # The core VVV utility
    - tls-ca # HTTPS SSL/TLS certificates
    - phpmyadmin # Web based database client
    #- memcached-admin # Object cache management
    #- opcache-status # opcache management
    #- webgrind # PHP Debugging
    #- mongodb # needed for Tideways/XHGui
    #- tideways # PHP profiling tool, also installs xhgui check https://varyingvagrantvagrants.org/docs/en-US/references/tideways-xhgui/
    #- php56
    #- php70
    #- php71
    #- php72
    #- php73
    #- php74

# vm_config controls how Vagrant provisions the virtual machine, and can be used to
# increase the memory given to VVV and the number of CPU cores.
# It can also be used to override the default provider being used within Vagrant.

vm_config:
  # For WP core development we recommend at least 2GB ( 2048 ),
  # If you have 4GB of RAM, lower this to 768MB or you may encounter issues
  memory: 2048
  # CPU cores:
  cores: 2

  # this tells VVV to use the prebuilt box copied from the USB drive at contributor days
  # once set to false, do not change back to true, and reprovision
  # wordcamp_contributor_day_box: false

  # Due to a limitation within Vagrant, the specified provider is only respected on a clean `vagrant up`
  # as Vagrant currently restricts you to one provider per machine
  # https://www.vagrantup.com/docs/providers/basic_usage.html#vagrant-up
  # provider: vmware_workstation

# General VVV options
general:
  # Backup the databases to the database/backups subfolder on halt/suspend/destroy, set to false to disable
  db_backup: true
  # Import the databases if they're missing from backups
  db_restore: true
  # set to true to use a synced shared folder for MariaDB database storage
  db_share_type: false
  # GitHub token to use from composer
  #github_token: xxxxxx

# Settings for the vagrant plugins supported by VVV
vagrant-plugins:
  disksize: 10GB # requires the disk size vagrant plugin

Possible Solution

I have checked the nginx error log to find this:

2020/03/20 00:03:44 [emerg] 18315#18315: cannot load certificate "/etc/nginx/server-2.1.0.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/nginx/server-2.1.0.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file)

I have also checked the file above on the VM and it is empty. I'm not sure if this should be the case?

Your Environment

OS: Ubuntu 18.04.4 LTS

bug reproduce utilities

Most helpful comment

All 10 comments

Thanks for opening your first issue here! Be sure to follow the issue template and include your OS/Vagrant/VVV versions! Don't forget you can get support in the VVV slack at https://varyingvagrantvagrants.org/docs/en-US/slack/

Is it possible to see the contents of provisioner-utility-core-tls-ca.log? You'll find it in the logs/provisioners folder under the respective date/time

Sure, here it is.

 * Running utility provisioner for 'core/tls-ca'
 * Setting up default Certificate for vvv.test and vvv.local
 * Generating key and CSR for vvv.test
 * Removing and renewing the default certificate
 * Symlinking default server certificate and key
 * Symlinking /srv/certificates/default/dev.crt to /etc/nginx/server-2.1.0.crt
 * Symlinking /srv/certificates/default/dev.key to /etc/nginx/server-2.1.0.key
 * Generating site certificates
 * Generating new certificate for: 'wordpress-one'
 * Generating new certificate for: 'wordpress-two'
 * Generating new certificate for: 'wordpress-trunk'
 * Generating new certificate for: 'wordpress-meta-environment'
 * Finished generating site certificates
 * Finished generating TLS certificates
 * The 'core/tls-ca' provisioner completed in 1 seconds

@cranmerjs and can you show me the folder structure of the certificates folder? tree certificates should do the trick

I've managed to reproduce the issue locally, those files are missing:

โฏ tree certificates/
certificates/
โ”œโ”€โ”€ ca
โ”‚ย ย  โ”œโ”€โ”€ ca.crt
โ”‚ย ย  โ”œโ”€โ”€ ca.key
โ”‚ย ย  โ””โ”€โ”€ ca.srl
โ”œโ”€โ”€ default
โ”‚ย ย  โ””โ”€โ”€ dev.key
โ”œโ”€โ”€ wordpress-meta-environment
โ”‚ย ย  โ”œโ”€โ”€ dev.crt
โ”‚ย ย  โ”œโ”€โ”€ dev.csr
โ”‚ย ย  โ”œโ”€โ”€ dev.key
โ”‚ย ย  โ””โ”€โ”€ openssl.conf
โ”œโ”€โ”€ wordpress-one
โ”‚ย ย  โ”œโ”€โ”€ dev.crt
โ”‚ย ย  โ”œโ”€โ”€ dev.csr
โ”‚ย ย  โ”œโ”€โ”€ dev.key
โ”‚ย ย  โ””โ”€โ”€ openssl.conf
โ”œโ”€โ”€ wordpress-trunk
โ”‚ย ย  โ”œโ”€โ”€ dev.crt
โ”‚ย ย  โ”œโ”€โ”€ dev.csr
โ”‚ย ย  โ”œโ”€โ”€ dev.key
โ”‚ย ย  โ””โ”€โ”€ openssl.conf
โ””โ”€โ”€ wordpress-two
    โ”œโ”€โ”€ dev.crt
    โ”œโ”€โ”€ dev.csr
    โ”œโ”€โ”€ dev.key
    โ””โ”€โ”€ openssl.conf

6 directories, 20 files

It's just the key in the default folder :(

Was this page helpful?
0 / 5 - 0 ratings