I currently work in a place where every developer programs on the same server and I don't believe it is a very good usage since I have to work on a network share, so it's a bit slow.
I setup a copy of BitNami MAMPstack and everything is working pretty good on port 8080 (I don't have any admin rights on my workstation).
The only problem is: I don't always work on the same project so I have to work on multiple local network vhosts. I'd like to make local vhosts that would point on my local machine. (Usually done simply by editing the hosts file). But since I don't have any admin rights, I can't edit /etc/hosts...
I use Firefox for development and I saw an add-on that was supposed to do so, but still at the end it edits the hosts file and needs admin rights...
Any ideas? Anyone knows how to do so?
Thanks a lot!
You really want to talk to your support personnel so that you get the rights you need AND don't fall afoul of your workplace's service agreements. That said, this is a question worth answering for folks who get locked out.
If you boot the system in single-user mode (hold down COMMAND-S while booting), you will get access to the file system to modify the hosts file (you will need to invoke a CLI editor like nano from its full path). Remember that OS X doesn't always use the same info as other Unix services, but I think MAMP should do so. It is possible that your admins have disabled single-user mode, but most likely not.
Instead of trying to setup name-based-virtual hosts, why not use alternate addresses or ports instead? This will allow you to setup your local web server without needing any admin rights or messing around with name resolution at all.
If you where using alternate ports you bind each virtual host to a different port (ie port 8000 > project1, 8001 > project2, 8002 > project3)?
If you are only using this from your local system then you could bind the virtual hosts to different loopback addresses (ie 127.0.0.1:8000 > project1, 127.0.0.2:8000 > project2, 127.0.0.3:8000 > project3).
http://httpd.apache.org/docs/2.2/vhosts/ip-based.html
You could even create another virtual host that included a quick index page that linked off to your other virtual hosts do you don't have to remember which ip/port to use.
You haven't said that you asked your support staff for admin access (or at least for them to make your change for you...). I'd try that first, providing them with a business case for your request. If your request is denied, run it up the flagpole until you get the answer you need.