Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers 2

up vote 3 down vote accepted

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.

share|improve this answer
    
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 Apr 20 '10 at 13:58
    
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 Apr 20 '10 at 15:23
    
ok, thanks for the help! –  mjr Apr 20 '10 at 16:32
add comment

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.

share|improve this answer
    
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 Apr 20 '10 at 13:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.