can I put files in hidden volume /home at the root level of macintosh HD

0

I am trying to reproduce the file structure of my VPS on my mac locally, so that it's easier for me to test websites in a local development environment

to do this I would need have a /home folder at the root level of the hard drive

using panic transmit I can see that there is already a volume called home at the root level

can I store other files and folders in here to set up my local web server?

sorry if this is a dumb question folks

mjr

Posted 2010-04-19T20:02:18.230

Reputation: 105

Answers

3

Unless your VPS is also running Mac OS X, you're better off running a virtual machine of your VPS's OS (linux?) under VirtualBox, VMWare or Parallels.

Another solution would be to put machine specific configuration information in a separate configuration file so that the machine-dependent information is separate from the rest of your code base.

Doug Harris

Posted 2010-04-19T20:02:18.230

Reputation: 23 578

ya the vps host is running linux

everything is working well with my setup except for some file paths

on the server it's like /home/sitename/public_html/ and on my local machine it's /Applications/MAMP/htdocs/whatever/

Is there any way to get these paths the same without having to install some kind of virtual machine software?

I just would like to be able to ftp files directly to the host and not have to change configs

or, do you have an example of how to set up a machine specific config file? – mjr – 2010-04-20T13:58:47.903

You would need to give more details about what sort of app this is -- I'm guessing it's a PHP app. From there, you need to look at where you have hard-coded paths. If they're in PHP files, you can include a local-settings.php file which sets variables for these paths. You could also be better about using relative paths. In the long run, a bunch of full hard-coded paths will cause your more headaches than you need. – Doug Harris – 2010-04-20T15:23:22.397

0

Why does the home folder need to be at the root level of your hard drive? Just put it in a convenient place (e.g. ~/Sites) and set the Document Root in MAMP (under the Apache tab in the Preferences sheet) to this folder. Now, if you navigate to the root of your website (usually http://localhost:8888/ in MAMP), the contents of this folder will be displayed.

Steve Harrison

Posted 2010-04-19T20:02:18.230

Reputation: 111

ya the issue I'm having is that I'm using a php cms that needs exact server paths to certain files

those paths are different on the local and remote host – mjr – 2010-04-20T13:53:16.693