P
P
phoenixweiss2013-04-18 14:55:49
PHP
phoenixweiss, 2013-04-18 14:55:49

Prompt in setting up MAMP PRO

Hello cheaters.
I have a question about setting up MAMP PRO.
Is it possible to set it up so that it automatically assumes folders are virtual hosts inside the user's folder?
The task is to make the contents of the ~/Users/username/Sites/ folder automatically taken as a virtual host, similar to how it is implemented in Denwer on Windows.

Or tell me an alternative way to run the contents of this folder in Apache.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita Gusakov, 2013-04-18
@phoenixweiss

You don't have to do that.
Install brew and php:

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
brew up && brew upgrade
brew tap homebrew/dupes
brew tap josegonzalez/homebrew-php
brew up && brew upgrade
brew install php54
sudo vim /etc/apache2/httpd.conf

Here edit the line where php comes from
sudo apachectl -k restart
brew install virtualhost.sh

Now creating virtual hosts is easy:
virtualhost.sh myhost.loc
virtualhost.sh --delete myhost.loc # удаление
virtualhost.sh --list # просмотр доступных

If you want to set hosts with a shorter command, write in /etc/profile what should be done when you start the terminal, I have this:
alias vhost="sudo virtualhost.sh "
alias mod777="sudo chmod -R 777 "

The second command will also be useful to you - the rights in Sites are constantly changing and applications cannot create their own folders, I don’t know how to deal with this, someone will tell you - I will be grateful)
PS brew shows instructions after installation and on the brew i command nfo <name>, so you won’t get lost . The repository contains a lot of good apc, xdebug and other popular extensions. All this works for php53, but I don’t see any reason to limit myself to it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question