Image & Embed URL issue

On my mac, I am using Mamp PRO to test RapidWeaver using Foundry websites. I have set my website up with a test domain name translated to my Mac’s IP address via the hosts file (via Mamp Pro). I can type the domain name into Safari and the web page displays OK. I can go into the alloy editor using the domain name. However when I drag a new image to a blog post or drag a just created embed stack icon from the Alloy editor onto a foundry stack while editing in RapidWeaver, the image and embed URL is starting with the IP Address and assigned port, as opposed to the domain name. This results in both the image not displaying and the embed saying the source can’t be found. I was originally using the ip address and port but this was causing issues in Alloy which was dropping the port number on certain Editor actions (like deleting a post).

I have done the normal things like checking the General tab is pointing to the domain name and setting the publish website to be the test domain name. I have republished all files (they are going locally on the Mac). Existing images displayed in Foundry web pages are OK. It is just Alloy which has “lost” access to blog images which all are referenced via the IP address and Port.

So it looks like the “base url” used in Alloy is remembering its original setup under an IP address and not updating to use the new test domain name.

I figure I must have missed a setting somewhere but can’t figure out where that is.

I am using Monterey 12.2.1, Mamp Pro 6.6.1 (PHP 7.4.21), RapidWeaver 8.9.3, Stacks 4.2.3b5, Foundry 2.4.3.0, Alloy 3.2.

Alloy isn’t designed around being used in this environment. Publish a test to your server.

I’ll clarify a little – Alloy is going to build out the URLs to images, etc when you upload them. Doing so on a local install of Alloy is going to do you zero good as those URLs will not translate over when you publish your site to a server.

Is your MAMP server bound to the IP address or the actual domain name? My guess is that it’s bound to the IP address of your computer and you’re just using the hosts file to point the domain to the IP address. The web server does not know anything about the domain name. It knows itself as the IP address. That’s probably all that Elixir’s code has access to, and it’s using the website address (IP address in this case) when it builds like links.

You could look into binding MAMP to a domain name and not an IP address. There should be guides on the web for doing so.

I don’t think this will help with the issue of the built URL’s pointing to the local domain. You may get around that by using the same domain name locally that you’ll use on the live system. You’d have to carefully test the out, if you want to continue in this direction.

Thanks all for the feedback. :smiley:

I was getting sidetracked trying to resolve thia and it isn’t important in the scheme of things, so I have abandoned trying to get it sorted. I appreciate that when the site is uploaded the URLS will be rebuilt. I just wanted the local install, running under my loacal MAMP Pro Apache server, to test out what it would potentially look like.