SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    Jan 2012
    Posts
    266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help with URL's on a Mac using MAMP

    I've been using MAMP on a Mac for several years. I have all my sites set up to be viewed locally at URL's like http://CH, http://SL, etc.

    I just upgraded to a new MacBook Pro and a new operating system (Lion), then upgraded MAMP. I used my old laptop settings as a guide in setting up a website in Dreamweaver, then setting it up with MAMP's Hosts feature.

    However, it doesn't work. When I navigate to http://SL, I get the message "Google Chrome could not connect to sl." I get the same message when I navigate to http://localhost

    When I type in http://localhost:8888, I get the message "Forbidden - You don't have permission to access / on this server."

    When I define my site in Dreamweaver and was asked to specify a URL, I tried http://SL and http://localhost/SL. Both prompted the following error message:

    "Dreamweaver cannot use the prefix you entered to display live data. Please double-check your site configuration or click on Help for more information on how to correct this problem. (HTTP Error: 0)."

    Anyway, can anyone tell me what I'm doing wrong? Again, I want to preview my websites at URL's like http://SL My websites are located in a top level folder named Sites, just as they are on my old computer. That could be part of the problem; I saw a comment somewhere that I should put my html files in the htdocs folder, which is located inside the Applications folder.

    I remember working through all this when I first installed MAMP on my other laptop years ago, but I can't remember how I fixed it.

    Thanks for any tips.

    P.S. If it sheds any light on the situation, I can access phpMyAdmin at http://localhost:8888/phpMyAdmin/?la...nguage=English

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by Chavista View Post
    I saw a comment somewhere that I should put my html files in the htdocs folder, which is located inside the Applications folder.
    That doesn't really matter; it's just an option. But you can't view your sites in MAMP at an address like http://SL without doing a bit of work, such as editing your hosts file. Here is a nice explanation of what to do:

    http://foundationphp.com/tutorials/vhosts_mamp.php

    (Even I, as a noob at this, was able to follow those instructions, which is saying a lot!)

    Quote Originally Posted by Chavista View Post
    When I type in http://localhost:8888, I get the message "Forbidden - You don't have permission to access / on this server."
    Not sure if this is the reason, but you have to make sure MAMP is actually running to be able to view your MAMP sites.

    PS: Just post your question once, and we can move it if needed.

  3. #3
    SitePoint Addict
    Join Date
    Jan 2012
    Posts
    266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the link; that's probably the answer. I remember editing a lot of files when I was on a PC, but I couldn't remember if I had to edit any on a Mac.

  4. #4
    SitePoint Addict
    Join Date
    Jan 2012
    Posts
    266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    On second thought, that article says you don't have to edit any files if you use MAMP Pro, which is the program I have. I guess I have to do a little more homework here...

  5. #5
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    Hm, yes, with the Pro version, you are supposed to be able to click a button or something, but I've not used it.

  6. #6
    SitePoint Addict
    Join Date
    Jan 2012
    Posts
    266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Got it!

    I figured it out. I just changed Apache's port to 80 and MySQL's port to 3306.

    Which isn't to say I was smart enough to figure it out myself; I just stumbled across the answer online.

    Thanks.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •