Entries Tagged as ''

Creating Virtual Hosts ON Your MAC for MAMP

Open up the terminal.
1)    Web-Two:~ webtwo$  cd /etc <–change directory to the etc directory

2)    Web-Two:etc webtwo$ sudo nano hosts <–super user do (does not stay logged in),  editor, file=hosts

3)    Password: *******  <– enter password

4)   Editor opens up. You will see something like this…

#
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost
fe80::1%lo0     localhost

5)  Type in the local IP followed by the name of the site you wish to make a virtual host for:
ie. 127.0.0.1 yoursite.you <– replace this with your name
You should do this for each site you wish to make a virtual host for , line by line.
Your /etc/hosts   file should now look more like this:
#
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost
fe80::1%lo0     localhost
127.0.0.1 yoursite.you

127.0.0.1 anothersite.you
127.0.0.1 yetanothersite.you

6)  Exit your editor, in this example I used, nano. Note: Be sure to SAVE the file.

7)  OK, now navigate to the file:    Applications/MAMP/conf/apache/httpd.conf  and open it in a text only editor ( like BBedit or Smultron or something )

8)  Scroll to the bottom of the httpd.conf file. For each site type in the following:

<VirtualHost *>
DocumentRoot “/Users/yourusername/Sites/site-folder-name”  <– replace with your own appropriate info
ServerName  localsite.you
<– replace with your own appropriate info
ServerAlias localsite.you <– replace with your own appropriate info
<Directory “/Applications/MAMP/htdocs”> <– do NOT change for MAMP
AllowOverride all  <– this allows the htacces file to work properly
</Directory>
</VirtualHost>

9) Save the Applications/MAMP/conf/apache/httpd.conf    file and RESTART your MAMP server.

Now, when you type in the  site   www.localsite.you  followed by your MAMP port (usually 8888) like this:

http://www.localsite.you:8888 your site will come up!

Hope this helps!

Viewing the Websites You Are Developing Locally on Your Computer Using MAMP

Normally, when using MAMP ( I am presently using the FREE version of MAMP) you view the site you are working on in a couple of ways.

Put your web site in the    /Applications/MAMP/htdocs/     folder and point your browser to   http://locahost:8888/

or (This is what I like to do for multiple site management)

Put your sites in appropriately named folders under the “Sites” folder.
Click on MAMP Preferences and select the “Apache” tab. Then click the “Select” button and browse to the “Sites” folder.

That way, you can easily get to any of the folders by typing in the URL http://localhost:8888/. You will be presented with a list of folders (as links). These folders are the sites you are developing under the Sites directory. Just click the folder (link) you wish to view and you’re there.

Hope this helps!

Screen shot of the up and comming CPI Data Panel

I havn’t posted in few weeks because I have been very busy with several projects. One of the projects I am particularly excited about the CPI panel. The Cpi panel is new “back end” for LoveFineArt.com. IT used to be that each and every product would take about 20 minuets to enter. With this new panel (incorperating secure AJAX), The products can be entered as fast as the site owner can type!

Here is a screen shot of the new back end.

Screen shot of the up and comming CPI Data Panel

I have also been busy learning the Drupal platform. AS I become more knowledgeable there will be posts and perhaps a special section on this blog devoted to cool new drupalistic methods and problem solving.

AS always, I invite you to leave a coment or sugestion or critisizm.

View Paul Leasure's profile on LinkedIn