11) Apache Web Server
Next, let’s get your website up and running for the world to see. OS X Server ships with Apache, which is the most widely used web server today. It’s developed and maintained by the open source community and freely available on various platforms.
- Launch Server Admin and select your server under Computers & Services. Log in as admin if necessary.
- Select Web, press the Sites tab and press the “+” button to add a site.

- In the Domain Name field, you should probably put in your domain name.
- In the IP address drop menu, it should default to your server’s IP address.
- Web servers by default uses port 80, and this is fine unless you have reasons to change it. Another common port for http traffic is 8080.
- In the Web Folder field, the default directory for your web documents is listed. This is the root of your web site where your files will reside. You can create and choose another directory if you have multiple sites on the same server, but for now leave it as is.
- The Default index files field lists the most common file types that Apache will serve when someone accesses your site. If you have a different name or file type for your site’s homepage, you can add it here.
- Error File field is the page that Apache will serve if someone tries to access something on your web server, but is not able to do so for whatever reasons. You can create your own and specify it’s location in this field.
- You may want to add an admin email for your server.

- Click on the Modules tab to get a list of Apache Modules that are installed. Checked boxes indicate enabled modules.
- For example, if you want the server to run Perl scripts, you would enable the perl_module. If you want to enable PHP version 4, check the box for php4_module. Click Save for the change to take effect.
- Some modules will require you to restart Apache.

- Press the green “Start Service” button on the top right of the panel to start Apache.
- Now let’s test your web server by accessing it through a web browser. First, try it with your server’s IP address. In my example, I’d type “http://192.168.1.100.”
- If all goes well, you should be greeted with a default page that ships with OS X Server. The files are located in: /Library/WebServer/Documents as indicated earlier.
- If you have DNS service running, you will be able to access your site using the appropriate local domain name. In my example, I’d type “nameserver.yourdomain.com”.
Now that you have your web server up and running, let’s make the changes necessary for people from the rest of the world can access your site.
- First, connect to your router and select the option for “port forwarding”. There should be a option where you can specify what traffic gets forwarded to a specific IP.
- In this case, you’ll need to have web traffic that uses port 80 to be forwarded to the IP of your OS X Server running Apache, which will in turn be listening for requests on port 80. In my example, I used the IP 192.168.1.100. For the type of traffic, select TCP. Make the necessary changes and save your settings.
- Next, you’ll need to log into your registrar account where you registered your domain. Since administering your domain accounts vary with different registrars, I’ll provide the specifics of what needs to be changed.
As I mentioned earlier, this will be easier if you have a static IP from your ISP. If you have a dynamic one, you’ll need to find an intermediary service that will map your dynamic IP to your domain as needed.
You may want to look into DynDNS.com for more information. They provide free basic service and an update client software to continually map your hostname to your IP.
Moving on, once you log onto your registrar account, there should be an option to manage your domain. Once you select your domain, look for an option to modify your host record. It may be under the advanced option of your domain management.
Make changes to reflect the following:

- Host name = @, IP Address/URL = “Your IP Number”, Record Type = A (Adress)
- Host name = www, IP Address/URL = @, Record Type = CNAME (Alias)
Once you update and save your records, the change should take effect relatively quickly. For me, it was almost immediate but there’s a chance you may have to wait a bit.
For your immediate gratification, OS X Server ships with a default HTML page so that you won’t have to create one. It’s all there in various languages in the default directory.
If you want to use your own files, place them in the default directory: /Library/WebServer/Documents
Now the moment of truth, type in www.yourdomain.com to see if the request reaches your server. If it does, congratulations! You now have your own web server.
No responses yet
Leave a Reply
You must be logged in to post a comment.
