Instant localhost sites for PHP developers
Linc
OwnerDetroit Icrontian
1-step dev sites on your laptop:
Now I type mkdev at the command prompt, give it a name, and go to [name].dev in my browser and start using the new site.
I posted about the Vanilla symlinks part here: http://vanillaforums.org/discussion/23877/1-step-vanilla-dev-sites
- Set up PHP, nginx, and Percona
- Use regex to capture all .dev domains in nginx
- Write a shell script to create a site folder, database, and hosts file entry
server_name ~^(www\.)?(?.*)\.dev$; root /www/$domain;My shell script, dropped in ~/bin, named 'mkdev' and made executable (step 3 above):
read -p "Name: " SITE #/etc/hosts sudo cp /etc/hosts /etc/hosts.original echo -e "127.0.0.1\t${SITE}.dev" | sudo tee -a /etc/hosts # copy files sudo cp -R /www/_copy /www/${SITE} sudo chown -R lincoln /www/${SITE} # database sudo echo "create database ${SITE}" | mysql -u rootThe stuff in '/www/_copy' (being used to populate new sites) is a skeleton copy of Vanilla Forums created with symlinks to my local git repo. So, whenever the git repo changes, Vanilla updates on every dev site.
Now I type mkdev at the command prompt, give it a name, and go to [name].dev in my browser and start using the new site.
I posted about the Vanilla symlinks part here: http://vanillaforums.org/discussion/23877/1-step-vanilla-dev-sites
4
Comments
Los Angeles, Calif. -- 5/29/2013
The US Sarcasm Survey (USSS) reported today that minor smugness with a preliminary magnitude of 3.7 was detected in the area of Seattle, WA.
"It was a short stint of priggishness," said Dr. Charles Lancer, USSS Chief Sarcasmologist. "Early figures suggest it was subtle beyond the notice of many, but we are nevertheless delighted that our sensitive detectors were able to identify it at the moment of its conception. We will continue to monitor for additional aftersnarks."
It was the "morning hour" when the sarcasm struck, said one bystander we interviewed on the street who added that it was "a devilishly subtle jab."
Story unfolding.
Step 2
Step 3
Large paragraph of other unnumbered steps