Problem accessing a second site's Local URL

Hi all,

I set up my first site in Local last week and have been working on it without any problems. Today I created a second site, and while Local says it was set up successfully, I am unable to access it in my browser—when I try to access it using its .dev URL, I get forwarded to my first site’s .dev URL. To try and fix this, I stopped my first site and restarted my second site, to no avail. I quit and re-opened Local, restarted the local machine, and have deleted and re-created the second site numerous times, using different Environment settings each time, and nothing works.

First site (works fine):
isola.dev
WordPress 4.7
PHP 5.6.20
Apache
MySQL 5.6

Second site (forwards to first site in browser):
mv-skate-park.dev
WordPress 4.7
PHP 5.6.20
nginx
MySQL 5.6.34

I have Local 1.3.0 and OS X 10.11.6. Any suggestions?

Sorry for the trouble!

Is the second site an export that you imported, Blueprint, or Clone?

Both are sites I created in Local. For the first site I brought in a theme I’m working on and imported my database (have been using MAMP for years.) For the second site I would like to do the same, but I get the redirection problems before doing anything to the second site, it’s just a fresh install done by Local.

Can you go ahead and delete that second site and try adding a new site?

Done. Same problem. I used the default site settings.

Can you go ahead and provide the log file for Local? You can find it under Help » Reveal Local’s Log. Feel free to only provide the log entries for the last day.

Dec 19, 2016, 4:16 PM EST - info: [main/index] Existing Pressmatic data does not exist.
Dec 19, 2016, 4:16 PM EST - info: [main/set-docker-env] Getting Docker Machine env.
Dec 19, 2016, 4:16 PM EST - info: [renderer/RendererAddonLoader] Renderer Loading Addon: /Applications/Local by Flywheel.app/Contents/Resources/extraResources/addons/local-addon-demo-urls/lib/renderer.js
Dec 19, 2016, 4:16 PM EST - info: [renderer/RendererAddonLoader] Renderer Successfully Loaded Addon: /Applications/Local by Flywheel.app/Contents/Resources/extraResources/addons/local-addon-demo-urls/lib/renderer.js
Dec 19, 2016, 4:16 PM EST - warn: [renderer/RendererAddonLoader] Renderer Addon not enabled: local-addon-intellij-xdebug
Dec 19, 2016, 4:16 PM EST - info: [main/autoUpdater] Update for darwin-x64-production-v1.3.0 is not available
Dec 19, 2016, 4:16 PM EST - info: [renderer/CheckEnvPage] Check system promise response: 
{ '0': undefined, '1': undefined }
Dec 19, 2016, 4:16 PM EST - info: [renderer/system-heartbeat] System Heartbeat: New timeoutID:  2
Dec 19, 2016, 4:22 PM EST - info: [main/index] before-quit: 
{ SJq8tXP7e: 'running', ryeTdu2Qx: 'halted' }
Dec 19, 2016, 5:03 PM EST - info: [main/index] Existing Pressmatic data does not exist.
Dec 19, 2016, 5:03 PM EST - info: [renderer/RendererAddonLoader] Renderer Loading Addon: /Applications/Local by Flywheel.app/Contents/Resources/extraResources/addons/local-addon-demo-urls/lib/renderer.js
Dec 19, 2016, 5:03 PM EST - info: [renderer/RendererAddonLoader] Renderer Successfully Loaded Addon: /Applications/Local by Flywheel.app/Contents/Resources/extraResources/addons/local-addon-demo-urls/lib/renderer.js
Dec 19, 2016, 5:03 PM EST - warn: [renderer/RendererAddonLoader] Renderer Addon not enabled: local-addon-intellij-xdebug
Dec 19, 2016, 5:03 PM EST - info: [renderer/CheckEnvPage] Check system promise response: [ undefined, 'machine-halted' ] machine-halted
Dec 19, 2016, 5:03 PM EST - info: [main/docker-machine] Running  /Applications/Local by Flywheel.app/Contents/Resources/extraResources/virtual-machine/vendor/docker/osx/docker-machine start local-by-flywheel
Dec 19, 2016, 5:03 PM EST - info: [main/docker-machine] Starting "local-by-flywheel"...
Dec 19, 2016, 5:03 PM EST - info: [main/autoUpdater] Update for darwin-x64-production-v1.3.0 is not available
Dec 19, 2016, 5:03 PM EST - info: [main/docker-machine] (local-by-flywheel) Check network to re-create if needed...
Dec 19, 2016, 5:03 PM EST - info: [main/docker-machine] (local-by-flywheel) Waiting for an IP...
Dec 19, 2016, 5:04 PM EST - info: [main/docker-machine] Machine "local-by-flywheel" was started.
Dec 19, 2016, 5:04 PM EST - info: [main/docker-machine] Waiting for SSH to be available...
Dec 19, 2016, 5:04 PM EST - info: [main/docker-machine] Detecting the provisioner...
Dec 19, 2016, 5:04 PM EST - info: [main/docker-machine] Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.
Dec 19, 2016, 5:04 PM EST - info: [main/set-docker-env] Getting Docker Machine env.
Dec 19, 2016, 5:04 PM EST - info: [main/docker-machine] checking IP
Dec 19, 2016, 5:04 PM EST - info: [main/startSite] Running start b3ae4152c149ab0f054dfd7d07478a55e61e363abc82d24f2365cd502f99e81d
Dec 19, 2016, 5:04 PM EST - info: [main/set-docker-env] Getting Docker Machine env.
Dec 19, 2016, 5:04 PM EST - info: [main/docker-machine] checked IP 192.168.75.100

Dec 19, 2016, 5:04 PM EST - info: [renderer/system-heartbeat] System Heartbeat: New timeoutID:  1
Dec 19, 2016, 5:04 PM EST - info: [main/docker-network-manager] maybeCreateNetwork
Dec 19, 2016, 5:04 PM EST - info: [main/docker-network-manager] doesNetworkExist
Dec 19, 2016, 5:04 PM EST - info: [main/docker-network-manager] Reconnecting b3ae4152c149ab0f054dfd7d07478a55e61e363abc82d24f2365cd502f99e81d.
Dec 19, 2016, 5:04 PM EST - info: [main/docker-router] Router: Check Config
Dec 19, 2016, 5:04 PM EST - info: [main/docker-network-manager] Network exists.
Dec 19, 2016, 5:04 PM EST - info: [main/docker-router] Router: Checking if existing router is mounted to Pressmatic folder. [{ /Users/raglan/Library/Application Support/Local by Flywheel/router /etc/nginx/router   true rprivate}]

Dec 19, 2016, 5:04 PM EST - info: [main/docker-router] Router: Looking for running router. [{ /Users/raglan/Library/Application Support/Local by Flywheel/router /etc/nginx/router   true rprivate}]

Dec 19, 2016, 5:04 PM EST - info: [main/docker-network-manager] Connecting b3ae4152c149ab0f054dfd7d07478a55e61e363abc82d24f2365cd502f99e81d to local network.
Dec 19, 2016, 5:04 PM EST - info: [main/docker-router] Router: Router not running. Starting now. 
{ id: 'afb5208ff4ef9f694e8dd721e0f69a1998c42ea627ed3b7e398fad0d0ad65e21' }
Dec 19, 2016, 5:04 PM EST - info: [main/docker-router] Router: Router started.
Dec 19, 2016, 5:04 PM EST - info: [main/docker-router] Router: Calling proxyManager
Dec 19, 2016, 5:04 PM EST - info: [main/docker-router] Router: Restart nginx
Dec 19, 2016, 5:04 PM EST - info: [main/proxy-manager] Running proxyManager::add
Dec 19, 2016, 5:04 PM EST - info: [main/hosts-helper] hostsHelper: maybeUpdate
Dec 19, 2016, 5:04 PM EST - info: [main/proxy-manager] add: should create cert or not:  true
Dec 19, 2016, 5:04 PM EST - info: [main/proxy-manager] addCert: ensuring router/certs exists
Dec 19, 2016, 5:04 PM EST - info: [main/proxy-manager] addCert: isola.dev.key already exists
Dec 19, 2016, 5:04 PM EST - info: [main/hosts-helper] hostsHelper: Hosts do not need updating
Dec 19, 2016, 5:04 PM EST - info: [main/docker-router] Router: Started /etc/scripts/router.sh 
Dec 19, 2016, 5:04 PM EST - info: [main/verify-wp-cli] Verifying WP-CLI for b3ae4152c149ab0f054dfd7d07478a55e61e363abc82d24f2365cd502f99e81d.
Dec 19, 2016, 5:06 PM EST - warn: [renderer/AddSitePage] Renderer Validation did not pass when submitting add site form. 
{ adminPassword: [ 'Admin Password is required' ] }
Dec 19, 2016, 5:06 PM EST - info: [main/docker-create-site-container] Starting new site container with image:  local-by-flywheel
Dec 19, 2016, 5:06 PM EST - info: [main/spawnProvisioningWorker]  
{ siteMessage: 'Provisioning nginx' }
Dec 19, 2016, 5:06 PM EST - info: [main/spawnProvisioningWorker] success
Dec 19, 2016, 5:06 PM EST - info: [main/spawnProvisioningWorker]  
{ siteMessage: 'Provisioning PHP' }
Dec 19, 2016, 5:06 PM EST - info: [main/spawnProvisioningWorker] success
Dec 19, 2016, 5:06 PM EST - info: [main/spawnProvisioningWorker]  
{ siteMessage: 'Provisioning MySQL' }
Dec 19, 2016, 5:06 PM EST - info: [main/spawnProvisioningWorker] success
Dec 19, 2016, 5:06 PM EST - info: [main/spawnProvisioningWorker]  
{ siteMessage: 'Provisioning Scripts' }
Dec 19, 2016, 5:06 PM EST - info: [main/spawnProvisioningWorker] success
Dec 19, 2016, 5:06 PM EST - info: [main/spawnProvisioningWorker]  
{ siteMessage: 'Provisioning WP-CLI' }
Dec 19, 2016, 5:06 PM EST - info: [main/spawnProvisioningWorker] Running ["exec","-i","16e02c7b4e656058a006f15870a41a79037f173a1bd885255a38aea5ef47a769","sh","-c","echo 'alias wp=\"wp --allow-root\"' >> ~/.bashrc"]
Dec 19, 2016, 5:06 PM EST - info: [main/spawnProvisioningWorker] Running ["exec","-i","16e02c7b4e656058a006f15870a41a79037f173a1bd885255a38aea5ef47a769","sh","-c","echo 'path: /app/public\\nrequire:\\n  - /etc/scripts/wp-cli/fw-local-search-replace.php' > /wp-cli.yml"]
Dec 19, 2016, 5:06 PM EST - info: [main/spawnProvisioningWorker] Running ["exec","-i","16e02c7b4e656058a006f15870a41a79037f173a1bd885255a38aea5ef47a769","mkdir","-p","/etc/scripts/wp-cli"]
Dec 19, 2016, 5:06 PM EST - info: [main/spawnProvisioningWorker] Running ["cp","/Applications/Local by Flywheel.app/Contents/Resources/extraResources/virtual-machine/components/wp-cli/fw-local-search-replace.php","16e02c7b4e656058a006f15870a41a79037f173a1bd885255a38aea5ef47a769:/etc/scripts/wp-cli"]
Dec 19, 2016, 5:06 PM EST - info: [main/spawnProvisioningWorker] Running ["cp","/Applications/Local by Flywheel.app/Contents/Resources/extraResources/virtual-machine/components/wp-cli/wp-cli.phar","16e02c7b4e656058a006f15870a41a79037f173a1bd885255a38aea5ef47a769:/usr/local/bin/wp"]
Dec 19, 2016, 5:06 PM EST - info: [main/spawnProvisioningWorker] Running ["exec","-i","16e02c7b4e656058a006f15870a41a79037f173a1bd885255a38aea5ef47a769","chmod","+x","/usr/local/bin/wp"]
Dec 19, 2016, 5:06 PM EST - info: [main/spawnProvisioningWorker] success
Dec 19, 2016, 5:06 PM EST - info: [main/createWebServerConf] Creating Web Server Conf
Dec 19, 2016, 5:06 PM EST - info: [main/createWebServerConf] Creating nginx config for site.
Dec 19, 2016, 5:06 PM EST - info: [main/docker-network-manager] maybeCreateNetwork
Dec 19, 2016, 5:06 PM EST - info: [main/docker-network-manager] doesNetworkExist
Dec 19, 2016, 5:06 PM EST - info: [main/docker-network-manager] Reconnecting b3ae4152c149ab0f054dfd7d07478a55e61e363abc82d24f2365cd502f99e81d.
Dec 19, 2016, 5:06 PM EST - info: [main/docker-network-manager] Reconnecting .
Dec 19, 2016, 5:06 PM EST - info: [main/docker-network-manager] Connecting  to local network.
Dec 19, 2016, 5:06 PM EST - warn: [main/index] Unhandled Rejection at: Promise  Promise { <rejected> undefined }  reason: 
Dec 19, 2016, 5:06 PM EST - info: [main/docker-network-manager] Network exists.
Dec 19, 2016, 5:06 PM EST - info: [main/docker-router] Router: Check Config
Dec 19, 2016, 5:06 PM EST - info: [main/docker-router] Router: Checking if existing router is mounted to Pressmatic folder. [{ /Users/raglan/Library/Application Support/Local by Flywheel/router /etc/nginx/router   true rprivate}]

Dec 19, 2016, 5:06 PM EST - info: [main/docker-router] Router: Looking for running router. [{ /Users/raglan/Library/Application Support/Local by Flywheel/router /etc/nginx/router   true rprivate}]

Dec 19, 2016, 5:06 PM EST - info: [main/docker-network-manager] Connecting b3ae4152c149ab0f054dfd7d07478a55e61e363abc82d24f2365cd502f99e81d to local network.
Dec 19, 2016, 5:06 PM EST - info: [main/docker-router] Router: Calling proxyManager
Dec 19, 2016, 5:06 PM EST - info: [main/proxy-manager] Running proxyManager::add
Dec 19, 2016, 5:06 PM EST - info: [main/hosts-helper] hostsHelper: maybeUpdate
Dec 19, 2016, 5:06 PM EST - info: [main/docker-router] Router: Restart nginx
Dec 19, 2016, 5:06 PM EST - info: [main/proxy-manager] add: should create cert or not:  true
Dec 19, 2016, 5:06 PM EST - info: [main/proxy-manager] addCert: ensuring router/certs exists
Dec 19, 2016, 5:06 PM EST - info: [main/proxy-manager] addCert: isola.dev.key already exists
Dec 19, 2016, 5:06 PM EST - info: [main/proxy-manager] Running proxyManager::add
Dec 19, 2016, 5:06 PM EST - warn: [main/proxy-manager] proxyManager::add: site domain or ports do not exist.
Dec 19, 2016, 5:06 PM EST - info: [main/hosts-helper] hostsHelper: Updating hosts
Dec 19, 2016, 5:06 PM EST - info: [main/hosts-helper] hostsHelper: Updating hosts with ELECTRON_RUN_AS_NODE=1 "/Applications/Local by Flywheel.app/Contents/MacOS/Local by Flywheel" "/Applications/Local by Flywheel.app/Contents/Resources/app.asar.unpacked/main/provisioning/update-hosts.js" 192.168.75.100 geronimo.dev isola.dev
Dec 19, 2016, 5:06 PM EST - info: [main/addSite] DNS Probe true
Dec 19, 2016, 5:06 PM EST - info: [main/addSite] API.WordPress.org is available. We can download the latest WordPress
Dec 19, 2016, 5:06 PM EST - info: [main/docker-router] Router: Started /etc/scripts/router.sh 
Dec 19, 2016, 5:06 PM EST - info: [main/addSite] Extracting to  /Users/raglan/Sites/geronimo/app Zip file is:  /Applications/Local by Flywheel.app/Contents/Resources/extraResources/virtual-machine/vendor/wordpress/wordpress-ry5y50SVx.zip
Dec 19, 2016, 5:06 PM EST - info: [main/addSite] WordPress .zip extracted.
Dec 19, 2016, 5:06 PM EST - info: [main/addSite] Running install-wp.sh
Dec 19, 2016, 5:07 PM EST - info: [main/hosts-helper] hostsHelper: Updated hosts.
Dec 19, 2016, 5:07 PM EST - info: [main/addSite] USER()	CURRENT_USER()
root@localhost	root@localhost
mysql password: pressmatic
wp-blog-header.php exists. configuring and installing.
Success: Generated 'wp-config.php' file.
Success: WordPress installed successfully.
Success: Deleted 'akismet' plugin.
Success: Deleted 'hello' plugin.

Dec 19, 2016, 5:07 PM EST - info: [main/verify-wp-cli] Verifying WP-CLI for 16e02c7b4e656058a006f15870a41a79037f173a1bd885255a38aea5ef47a769.
Dec 19, 2016, 6:06 PM EST - info: [main/verify-wp-cli] Verifying WP-CLI for b3ae4152c149ab0f054dfd7d07478a55e61e363abc82d24f2365cd502f99e81d.
Dec 19, 2016, 6:06 PM EST - info: [main/verify-wp-cli] Verifying WP-CLI for 16e02c7b4e656058a006f15870a41a79037f173a1bd885255a38aea5ef47a769.
Dec 19, 2016, 6:42 PM EST - info: [main/verify-wp-cli] Verifying WP-CLI for b3ae4152c149ab0f054dfd7d07478a55e61e363abc82d24f2365cd502f99e81d.
Dec 19, 2016, 6:43 PM EST - info: [main/verify-wp-cli] Verifying WP-CLI for 16e02c7b4e656058a006f15870a41a79037f173a1bd885255a38aea5ef47a769.

I am having the same issue, same setup. Will keep an eye on solutions.

@raglan

Everything looks good in the log file at first glance.

Very sorry for the trouble!

Can you please zip up the conf directory for the site you’re having trouble with as well as ~/Library/Application Support/Local by Flywheel/router/ and e-mail it to clay@getflywheel.com?


@oaklandunited feel free to send me those zips as well as your .log as well :slight_smile:

Sent

Hi!

Sorry I’m using this thread… I have the same issue and I was wondering if you guys reached any solution.

I set up a new Wordpress website and worked in it for a bit. All great there.

Then I set up a second website from scratch in Local, it seem it installed good, but when I went to “admin” or “view site” I realised it only loads the firs site I created. If I manually type

second-webiste.com/wp-admin/

automatically goes to the first website I created.

Any ideas?

Thanks

1 Like

Actually I just understood what happened. I’m going to leave my solution here for future references.

When creating a new local site, under Wordpress settings, the last option is “Admin E-mail”.

Before, I was typing there my email address. This time I left it untouched with the default email address dev-email@flywheel.local and the second and third sites have been successful created with no issues, thank you.

1 Like

Neither ryan nor Carmilla’s fixes work for me

1 Like

@clay any update on this issue? Thanks

Hello, I’m having the same issue. I’ve created a new site ‘Site 2’ via a Blueprint based on ‘Site 1’. While trying to log into ‘Site 2’ via the LbF I am redirected to the admin portal for ‘Site 1’. Any thoughts?

@jpize

Have you tried restarting the second site?


@raglan

Still looking for the underlying cause. It seems to be a race condition but it’s hard to pin point :slight_smile:

Thanks for the reply. I’ve tried restarting it and switching internet connections. I’ve also deleted the Blueprint and made a new one at least 5 times. I’m wondering if it’s in a setting within the install?

Just to clarify, it doesn’t redirect you to Site 1 on the front end?

Was this a fresh site in Local that you created a Blueprint from or was it an existing site that you brought into Local then created a Blueprint from?

Good questions.

  1. I’m not totally sure what you meant by “redirect you to Site 1 on the front end”. When I create a new site from the blueprint first, it hangs forever on “Provisioning WP-CLI” and I have to quite Local and restart. Upon restart the new site shows up. Then when I click on the Go to Admin button it takes me to the WP admin for the site the blueprint was based on. Does this makes sense?

  2. It was a site I built in Local first.

Thanks,
Justin

So after taking a couple months off from using Local by Flywheel I fired it back up and created a new site, and at first it had the same problem of redirecting to the old site but a simple restart of the new site and command-option-E in Safari to empty caches fixed it. To be clear, that’s exactly what I tried before to no avail. Dunno what changed. Since then i’ve found I usually have to do the restart+empty cache thing with every new site I create, except tonight I made a site (from a Blueprint, not sure that matters) and I didn’t have to do anything, it worked right off the bat :slight_smile: