Host a Web Site


Recommended Posts

Apache is already installed under Panther.

To host stuff, just go to System Preferences > Sharing > Check Personal Web Sharing. Then you can just drop files in /Library/WebServer/Docuements/ or in your Sites folder to access them over the network. They even have Rendezvous built into the Apache server, so you can auto-discover it over a network :)

Link to comment
Share on other sites

Of course OS X can natively host a web site. Look in your home folder. See that "Sites" folder? That's what it is for. Go into your sharing preference panel and turn on Personal Web Sharing. Replace the files in the Sites folder with whatever content you want for your site. By the way, there is no need to install Apache in OS X, it's already there. That is what OS X uses for hosting sites.

Link to comment
Share on other sites

sure. Just go to /library/webserver/documents and put your site there.

I find that annoying because you (as a normal or admin user) don't have permissions to write there so you need to enter your password every time you try to put something there and because it means your documents aren't in your home folder.

There are two ways to fix this:

1) Create a sym-link at documents to point to a folder in your sites folder using terminal:

cd /library/webserver

mv Documents Documents-backup

ln -s ~/sites/sitefortheroot ./Documents

2) edit apache's configuration file to change the document root folder (again with terminal)

cd /etc/httdp

sudo pico -w httpd.conf

enter your password

then press CTRL+W, type "DocumentRoot" (no quotes)

it will find a line that reads: DocumentRoot "/Library/Webserver/Documents"

change that line to read something like:

DocumentRoot "/users/myname/myrootsite"

press CTRL+O to save, the CTRL+X X to quit

You'll have to re-start apache. The easiest way to do that is turn of personal web servering, then turn it back on. Now you'll be able to go:

http://your.ip.or.domain/ and get the "myrootsite", but also to "http://your.ip.or.domain/~username" and get those sites too.

Good luck

Link to comment
Share on other sites

I normally just change teh apache config file like evn show said.,.... it's also useful to enable PHP if you're into that sortta stuff (no it doesn't need to be installed... it's just not activated).

Link to comment
Share on other sites

I find that annoying because you (as a normal or admin user) don't have permissions to write there so you need to enter your password every time you try to put something there and because it means your documents aren't in your home folder.

Or you can just give the folder world writable permissions :)

Link to comment
Share on other sites

Wow, at this precise moment i'm having trouble with Apache in Windows! Grr.

I want that eMac, and I have only ?150 of ?800.

Bah, looks like i'm going to be saving for another 6 months.

Link to comment
Share on other sites

I find that annoying because you (as a normal or admin user) don't have permissions to write there so you need to enter your password every time you try to put something there

Weird, I've never encountered that... don't remember changing permissions at all either.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.