How do I make my computer a web server?

Yes, but you must of course the be prepared to have it running 24/7.

To enable the built-in Apache you'll just have to turn on 'Personal websharing' in the 'Sharing' prefPane in the 'System Preferences'.

Now, PHP *isn't turned on by default. To do that, you'll have to mess around in a *nix configuration file called httpd.conf. Information on what to change is here: http://dk2.php.net/manual/en/faq.installation.php#faq.installation.processing

You'll have to be root to edit httpd.conf. There are three user-friendly ways of doing that
1) using BBEdit http://www.versiontracker.com/dyn/moreinfo/macosx/603
2) using Pseudo http://www.versiontracker.com/dyn/moreinfo/macosx/9608 to launch TextEdit
3) using Terminal to launch TextEdit as root : http://www.macosxhints.com/article.php?story=20030330175504453

in case 1) you can then execute 'bbedit /private/etc/httpd/httpd.conf' in Terminal
in case 2) and 3) execute 'open -e /private/etc/httpd/httpd.conf' in Terminal
 
i turn websharing on, anbd it worked, and i put my web page there, and it worked, but why won't dot tk accept it as a web address? it says it's being redirected already?
 
Lt Major Burns said:
i turn websharing on, anbd it worked, and i put my web page there, and it worked, but why won't dot tk accept it as a web address? it says it's being redirected already?
More information, please.
 
ye. more details.

if i turn on presonal web sharing, that means my computer can only be accessed by others on my network doesn't it.

how do you make it so that when someone types in your ip address, from anywhere in the world, they connect to your web site?
 
i've downloaded Pseudo (no. 3 didn't work) and i opened text edit with it, but then when i type in 'open -e /private/etc/httpd/httpd.conf', it doesn't give let me save it and says i have to be root. what do i do?
 
prefix with sudo then:
sudo open -e /private/etc/httpd/httpd.conf
and enter admin password when prompted

That should hopefully work - I'm usually using 1)

Good Luck
 
eliezer said:
ye. more details.

if i turn on presonal web sharing, that means my computer can only be accessed by others on my network doesn't it.

how do you make it so that when someone types in your ip address, from anywhere in the world, they connect to your web site?

You need to have an externally viewable IP and something to bridge that external IP to the internal IP you are using. You can do this with a basic router.
 
Back
Top