Mac OS X uses Apache for its internal “web sharing”, and time was, this was a well exposed and documented tool. But recent versions of the OS have started to edge away from this, to the point where it’s increasingly hard to make the server parts of it work the way they used to do.
First thing I would do is set a new site folder. To do this, open File / Document Setup. On the first pane, mid-way down, you will see a button labeled Site Folder. Click it, and choose a new path to a new folder. Put it somewhere in your regular Documents folder, maybe, called “my_site” or anything else that doesn’t have spaces in it. Next time you publish, all of your files will be put there. The original ones will still be where they are now, in the Library/WebServer/Documents folder. So the next trick you can do is make a symlink (a Unix Alias) from your new site folder to the old server repo. That symlink will carry the permissions of whatever it points at, and since that original folder is in your Documents folder and you created it in Finder, you will be able to save files into it.
On to the symlink. You will need to open Terminal.app, which is in Applications/Utilities. Your user account must be an “admin” account, able to administer the computer, since you will be using the sudo command to become the almighty root
user for the duration of each command.
You need to determine a few things first. In Terminal, type the following command, followed by pressing the Return key:
whoami
On my Mac, this returns waltd
. Note whatever it says for you, and substitute that for [username]
wherever you see it in the following commands.
Type the following lines, each followed by a Return. After the first line that begins with sudo
, you will be prompted for your password. This is your Mac account password, and you should only be asked once, unless you pause for a long time between commands.
cd /Library/WebServer
sudo mv Documents Documents.backup
sudo ln -s /Users/[username]/Documents/my_site Documents
sudo apachectl configtest
If the last line says “Syntax OK”, then you can type the last command:
sudo apachectl graceful
to restart the server. Your new site documents should now be available in the system Apache at localhost
.
Obviously, if you didn’t name that folder my_site
, change that at the same time you are changing [username] to whatever your Unix short-name is.
Walter
On Apr 29, 2016, at 10:36 PM, macsrwe email@hidden wrote:
I’ve run into this problem several times. I know the solution – I just don’t know the permanent solution.
If you choose File / Document Info / General Details, you’ll see a line for “Site Folder.” In my case (and maybe in yours, too), it’s /Library/Web Server/Documents – the Mac’s own main website folder – because when I (long ago) set up Freeway Pro, I wanted it to export the website directly there so I could browse to [localhost] and test out the site (including all its server-side processing) before uploading it publicly.
Since I first set Freeway up, way back in Jaguar, or Tiger, or whenever, OS X has grown increasingly niffy about its prerogatives and accesses on things in system folders. Every time I upgrade a system, it resets many if not all changes I may have made in there. As a result, I regularly lose access to this folder, and the next time I run Freeway Pro, I get that message.
In effect, the message is misleading – the problem is not that there is a “file in use,” it’s that the user doesn’t have write access to that file. So number one, that ought to be changed. (Are you reading this, Softpress?)
The remaining problem is that although I distinctly (?) remember “cleverly” setting up that export folder location myself, I can no longer find a way in the current version of Freeway Pro to alter it. I can see what it is, using the method from my first paragraph, but I 'd like to permanently change it to somewhere else precisely to avoid this problem in the future, and I can’t find any control to do so. I can’t even find “export” in the “Using Freeway” help manual.
Hope this helps out the next poor luser who gets this confusing message.
freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options