Tags
After many failed attempts, I have found out how to get web sharing with apache to work on my mac with leopard os x 10.5.2
http://discussions.apple.com/thread.jspa?messageID=6184905
Update 2: I’ve been using web sharing on my MBP and encountered an annoyance. In Sharing under System Prefrences, it shows http://192.168.1.3/~dagny/ as the URL of my home page. This is fine until my rounter assigns my mac a new IP address, a normal occurance. If I bookmarked the URL I will get an http error. The fix is to change the IP address (192.168.1.3 in this case) to localhost. So the URL becomes http://localhost/~dagny/ localhost is the IP shorthand for “this machine” and is the loopback ip address (127.0.0.1) NOTE: This is only good when I access the page from my computer – which I do a lot when working on web sites locally.
Update: This post gets read a lot. To summarize the linked article, there was a problem in the installer, it did not copy a file that Apache needs. The details are in the article. I found that I had to change to the root user (in terminal, su root) to copy the files.
duyvan82 said:
Could you please specify how to get web sharing working on 10.5.2? I try to access the discussion thread on Apple’s discussions forums but apparently they’ve deleted that topic >_<
I’ve had a hard time trying to get apache up and running. Thanks in advance.
Dagny Gromer said:
Instructions for fixing web sharing for 10.5 Leopard Upgrade.
1. Go to the “Go” menu at the top and scroll down to “Go to Folder”
2. Type in /etc
3. In the etc folder, open up httpd folder
4. In the httpd folder, open up the users folder
5. In the users folder you will find a file with yourname.conf
6. Copy this file to the desktop by dragging it to the desktop and letting go. It will copy..
7. Close down the users folder and the httpd folder.
8. You will be back in the etc folder.
9. In the etc folder, open up the apache2 folder
10. In the apcahe2 folder open up the users folder.
11. Drag the yourname.conf into the users folder. It will ask you to authenticate…. Do so….
12. Close down all your windows and then turn on Web Sharing in the Preference Panel…
Your Web Sharing should now be working….
smic said:
Thanks for this, I found a few other methods, none as easy as this. Much appreciated.
Olamide Lawrence Olaniyi said:
Hi I type in http://localhost/~myname in the URL bar but i keep getting a 403 Forbidden error? Is there any way you can help me?
Dagny Gromer said:
Olamide – Assuming you are on 10.5, follow the instructions above. The go to system tools and turn off and then on web sharing. This seems to work for many folks.
Perth said:
My localhost IP switched from 192.168.1.2 to 192.168.1.3 after an error. Any idea of how to get it back? Using Leopard.
Dagny Gromer said:
Perth, the 192.168.x.y address is assigned to your computer dynamically by your router’s DHCP server. There may not be a way to reset it, but check your routers documentation.
This IP is different than localhost, which is always 127.0.0.1 Using 127.0.0.1 causes a loopback inside the IP stack so packets sent to this address don’t get sent to your LAN or the internet. From a terminal window, type ping 127.0.0.1
Helena Palma said:
Thank you for such a clear explanation.
I have a problem: I do not have a “users” folder inside the “/etc/httpd” folder
Dagny Gromer said:
Helena – If there is no users folder inside /etc/httpd, just create it.