Can't get bedrock + multisite running properly on Apache

Hi all,

So — over the weekend I spent some time getting bedrock-ansible running, and starting a project for a client on that setup.

Unfortunately, I subsequently found out, early this morning, that the deployment server is going to be Apache, and that NGINX is not going to be an option. Consequently I’m trying to port the work done thus-far over to Apache.

Essentially, I’m trying to move bedrock out of bedrock-ansible and over to an apache dev box.

Unfortunately, I’m having no luck at all - no matter what I try, I’m having apache issues with the subdomain install stuff that bedrock implements.

  1. Using the original bedrock project files, and database (imported to the new puphpet/LAMP vm), I’ve reconfigured the .env stuff to access the new VM’s db.
  2. Apache is set up to serve up the document root from the /web folder of the bedrock project
  3. Multisite declarations are properly set up in /config/application.php
  4. Multisite .htaccess rules are set up in /web/.htaccess
  5. There’s presently only one site setup in the multisite network

The faulty behaviours I’m getting are:

  1. primary site loads correctly at the base url (mysite.dev)

  2. on local vm hitting mysite.dev/wp-admin properly redirects to mysite.dev/wp/wp-admin — however on remote droplet hitting mysite.com/wp-admin throws a 500 server error

  3. on local vm after successful login, the dashboard is being served up at mysite.dev/wp-admin, not mysite.dev/wp/wp-admin… weird.

  4. on both local and remote: the nav link url that comes up for the “Network Admin” link in the wp admin bar is mysite.dev/wp-admin/network (or mysite.com/wp-admin/network) — which obviously does not work. Presumably this should be mysite.dev/wp/wp-admin/network

Any ideas what’s causing this madness?

Thanks,
Tim

P.S. here’s the apache config I’m running on the remote droplet:


<VirtualHost *:80>
  ServerAdmin webmaster@localhost
  ServerName 123.456.789.098
  DocumentRoot /var/www/mysite/current/web

  <Directory />
    Options FollowSymLinks
    AllowOverride All
  </Directory>

  <Directory /var/www/mysite/current/web>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
  </Directory>

  ServerAlias mysite.staging.mydomain.com
</VirtualHost>