Apache

Web Serving Made Easy Part 1

In the next month (or two) I’ll cover the scope of web serving on MacOS X
Jaguar. You don’t need the server edition, and you don’t need to buy anything
else. Today is going to be the basics, next week we’ll learn how to do port
forwarding and get a domain name.

The first part of web serving is turning Apache on. Apache is the world’s
most popular web server, and it happens to come built into OS X! To turn it
on just head over to System Preferences and choose Sharing. Click the checkbox
next to "Personal Web Sharing". That’s it…. You’ve just started up your own
web server.

Fire up your web browser and type ‘localhost’ into the link bar. This is a
de facto address for your compute, so in other words your browser is going
to be asking a web server on your computer for its index. You should be greeted
with a simple page that comes with Jaguar. If not, make sure you’ve turned
on "Personal Web Sharing".

In your home folder there is a folder called "Sites". Anything you
place in this folder can be accessed via the web by messing with the url: localhost/~username will fetch
the files located in the site folder of the user dubbed "username". Try it
out with your username. You should see another simple web page that’s built
into the system.

Here’s where it gets interesting. If you are not behind a router, and have
broadband you’ll be able to share files or set up a web site for all to see.
If you are behind a router, you’ll have to wait until next week. If you don’t
know if you’re behind a router, just continue and see what happens… It can’t
hurt.

Your friend can’t use localhost because
that will make his browser look on his computer. You have to tell it to look
on yours. Look up your IP address by going to System Preferences and choosing
Network. Highlight and copy the IP address and then make it into a link like
this:

http://youripadress

If a friend can type that into her browser and get the same page you saw,
then you’ve successfully completed part one. Stay tuned in the coming weeks,
I’ll be showing how to do everything from IP forwarding to installing MySQL.

AMP your Mac’s Webserver

There’s all kinds of talk about the web becoming the new desktop. Today we’re going to review how to turn your desktop into a “web-top”. You’ll be able to access powerful server applications locally, and enjoy the same features remotely – accessing your Mac from the web.

In part one, we’ll set up the infrastructure we’ll need to install these server applications on your Mac.

Get your AMP package

We have a couple options to install and pre-configure Apache, MySQL and PHP:

XAMPP

This package includes extras like SSL and is pretty easy to install. You’ll want to shut down your built-in Apache install by turning off web sharing on the Sharing preference pane, as XAMP’s Apache runs on the same port. The install is simple, but you’ll have to use the terminal will to start and stop the package.

xampp AMP your Macs Webserver

Once installed you can browse to localhost in your browser and view you security settings. To change the default passwords you will need to fire the terminal up again, but it is easy.

MAMP

MAMP is a more Mac-centric package that absolves you of the command line. The MAMP package includes a cocoa application to start and stop your server and runs Apache on port 8080 – allowing you to leave your web sharing on its default port of 80. MAMP doesn’t include SSL, though.

mamp AMP your Macs Webserver

MAMP is the most convenient to run, and includes preferences managed in the application. Your server will be browsable at localhost:8080.

So what do you have now? A pro-quality web server, featuring PHP and MySQL allowing you to install a slew of popular, powerful server applications that you will be able to run right from your Mac. Next week we’ll look at some server-based applications that rival the convenience of desktop applications. What’s more, with remote access set up, you can enjoy fast, secure access to the same applications from anywhere.

Extras

Here are a couple of utilities that will help you get more out of your new install:

Weblock

This donationware utility makes it easy to apply access restrictions to folders in your web-shared folders. A great way to protect files while keeping them accessible.

DNSUpdate

This is another donationware application that works with the DynDNS dynamic host service. DynDNS supplies you with an easy to remember address, like whatever.dyndns.org and points it to your Mac. This app, DNSUpdate keeps your dynamic IP in sync with DynDNS to keep your external link working.

Tune in for more freeware and for the upcoming Part Two of this feature, where we’ll look at some great server-based freeware you can run from your AMP-enabled Mac.

Brian

Apple posts Security Update 2008-007

There are few things more boring than a security update, so let’s get this over with quickly: all at once like ripping off a band-aid.

Apple has issued Security Update 2008-007, addressing vulnerabilities in Apache 2.2.8, Root certificates, ClamAV 0.93.3, ColorSync, Finder, launchd, libxslt, MySQL 5.0.45, Networking, PHP 4.4.8, Postfix, PSNormalizer, QuickLook, rlogin, Script Editor, Single Sign-On, Tomcat, vim and Weblog. If you really want to know all the nastiness that might befall you if you don’t apply this update, read here.

To apply Security Update 2008-007, launch Software Update or click the appropriate link below to download and self-medicate:

Note: