How to make Local Lightning play nice with local installation of apache environment

Before installing the new Local Lightning v5.x, I had install PHP, MySQL & Apache via Homebrew following the instruction HERE. for my local environment.

Since the previous Local by Flywheel v3.x uses Virtual Box, everything works alright for me as I do non WordPress project on the folder ~/Sites and WordPress(with Local by Flywheel) on ~/Local Sites.

On top of that I had these configuration on httpd-vhosts.conf to use folder name inside ~/Sites as the domain name without adding them in hosts file. For example, ~/Sites/example will allow me to view the url http://example.localhost on browser.

<VirtualHost *:80>
    ServerName localhost
    ServerAlias *.localhost

    LogFormat "%V %h %t \"%r\" %s %b" vcommon
    CustomLog ~/Sites/.log/access_log vcommon
    ErrorLog ~/Sites/.log/error_log

    VirtualDocumentRoot ~/Sites/%1

    # Make php set the DOCUMENT_ROOT correctly since
    # apache doesn't set it correctly to the virtual one.
    # See https://joshbenner.me/blog/quick-tip-get-proper-document-root-when-using-mod-vhost-alias
    php_admin_value auto_prepend_file "~/Sites/.conf/setdocroot.php"

</VirtualHost>

Now the problem started when I am testing Local v5 after creating a new site, it shows these when I try to access the WordPress admin and site.

Not Found
The requested URL was not found on this server.

But the PHP project on ~/Sites is still working properly. So I went ahead and restart my system, only this time I load Local v5 first and my WordPress site works but my PHP projects get the 404 not found message by Local.

I would like to ask if anyone can point me in the right direction in getting both of the environment to work properly in concurrent. Thanks!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.