It is time to build another web server, and this time I will write about what is on it. I have built this configuration on the original iMac all the way up to the latest Xserve with success, so it is possible to make a cheap web server out of an older computer. To further save money, you could use all the apps with a different OS like FreeBSD, Darwin, NetBSD, OpenBSD, etc (I like the BSDs) which are free.
- OS: Mac OS X
- Web Server: Apache
- Web Server Benchmarking: Siege
- Web Authentication Apache Module: mod_auth_mysql
- Database: MySQL
- Database Management Software: phpMyAdmin
- Scripting Language: PHP
- Search Engine: ht://Dig
- Web Calendar: phpiCalendar
- Tasks Management Software: (to keep track of all this) Tasks
- WebMail: Squirrelmail
- News: phpNews
- Blogging: WordPress
If you ever need to serve a web site for, let’s say a presentation, on a local address and need to connect to another computer…perhaps your database/ Web Objects server locally as well, and you are running Mac OS X…then I have some information for you.
- If you want to serve the web site on 10.0.0.2 and have your other server on 10.0.0.3, open the terminal and type in: sudo ifconfig en0 10.0.0.2. This will change the IP address. (changing the IP address in the network control panel was not enough)
- Next, edit the apache conf file:
sudo pico /etc/httpd/httpd.confand add
Listen 10.0.0.2:80and then restart apache
Now you can serve 10.0.0.2 on your local machine and connect to a computer on your local network. (connected by an ethernet cable)
Well it is WWDC time and Apple has released information about my friend and your’s Mac OS X Server, the new improved version. We finally get mobile home directories, I am really excited about that, but then Apple talks about “Certificate management”….gee I wonder if you can rename the cert files (when you serve more than one site) and have apache start? That might be too much to ask, but I am glad Apple thinks it is something to mention. I also wonder how they are going to address the change ip issue. Time will tell, but I will not hold my breath. I would love to go somewhere, most likely a school district, set up Mac OS X Server to serve exactly like Apple thinks it should serve and have everything just work. I know it can, but if you try anything different…you will find problems. (see past posts) Mac OS X Server scares me for serveral reasons, but none more than the idea of UNIX admins looking at Apple’s awesome hardware and then being completely disappointed with the OS when trying to customize it. (you know, like adding more than one ErrorDocuments for a custom error reporting script…who would ever want that?) I can deal with Mac OS X Server issues…but I do not want to see other’s put off by Apple’s weird configurations. How can users talk to developers…and have the developers actually respond to the user’s issues? I have had engineers duplicate problems and release after release the issues still remain. Thoughts? We now have the hardware that is attracting high end users, let’s give them the software too!
Well…one look at the “Safari cannot connect to localhost because your computer is connected to the internet” message I received yesterday while trying to view my web site while on the train and I about lost it. After I hacked the apache conf, that was enough for me to put up the white flag when dealing with Mac OS X Server. Apple needs to hire me or some other apache/mac based person to tweak the apache conf in Mac OS X Server. I am so frustrated at this point I am going to throw Mac OS X client on my Xserve so I can get away from Apple’s “weird trying to be helpful GUI”. I have written to the engineers, had them duplicate the problem, and then not fix it.
I do want to use Mac OS X Server, but not in the state it is now. So close Apple…so close, just hire me and I will help you obtain “Industrial Strength” status with web serving. 😉
I often perform the same tasks over and over and yet forget some little thing. This post is a reminder for me.
General Apple hints.
- What to do when you get the “Do not enter sign”. (besides wonder how to describe it while searching for a solution)
- Starting up in target disk mode: hold down “t”
- Starting up in single user mode: hold down Apple +”s”
- How to set up open firmware password protection
- Command to check for user preference errors: sudo plutil -s ~/Library/Preferences/*.plist
Mac OS X Server hints, aka Industrial Strength hints.
- Don’t change Mac OS X Server’s IP 😉
- When installing SSL certs on OS X Server (at least in 10.3 and below), if you change the cert file location from anything but the default, you will also need to change it in all your sites or Mac OS X Server will not be able to restart apache.
- Apple: “Well Known” TCP and UDP Ports Used By Apple Software Products
- Server Monitor not working after a clone? Make sure it is by adding: hwmond:respawn:/usr/sbin/hwmond # Hardware Monitor daemon to /etc/watchdog.conf
Tutorials and general resources.
- That web site I am always trying to remember, but never bookamrk: http://www.entropy.ch/home/welcome.php
- Web site that tests your mail server for open relay
- Awesome web tutorial web site
- All kinds of great tutorials
- Great web developer’s resource
Web development hints.
Is it common to change a server’s IP? I suppose yes and no. Yes, say you decide to move to a data center or your office moves or you want to configure a server to replace another server already using the IP you want for DNS reasons or you just need to reorganize your subnet. Yes, a change in IP is possible. Apple, thanks for figuring that out. I have been using Mac OS X Server since it first appeared on the scene and the sight of a “wheel” user really jarred me. Until now (Mac OS X Server 10.3.x) changing the IP was difficult at best. I called myself a “professional Mac OS X Server installer” for awhile because of needing to change the IP.
Every new version of Mac OS X Server promised ways of changing the IP with ease. Somewhere along the line, I think with Mac OS X Server 10.2 Apple even included an option in the install to use a temporary IP. Hmm, last week when I configured my Xserve (many times) the option was no longer available. Darn…it worked so well! (not) I had hopes for the new “changeip” (man changeip on OS X Server for more information) command, but like all other attempts to change the IP on my Mac OS X Server it failed, and failed miserably.
I do not really understand what the problem is. I have several Mac OS X clients that run web servers and other server processes and when I change that IP, the OS does not think anything of it. Mac OS X Server however is “industrial strength” and therefore has many more complicated issues. In theory you are can log in as root, type in a command like: “changeip 10.0.0.1 10.0.0.2 oldhost newhost” to change the IP from 10.0.0.1 to 10.0.0.2. I was so sure Apple would not burn me that I spent a day configuring my Xserve and then finished the configuration over Remote Desktop at home so I could come in, log in in single user mode and run the changip command.
I walked in my office, happily rebooted the server in single user mode, typed the command in, and received a NetInfo error. No worries, the error code was no where to be found in Apple’s Knowledge Base(No the link is not incorrect, that is just my way of giving you first hand experience of what I got) NetInfo…another friend of mine. Ok, I thought, maybe something weird happened, I will just restart. Nope, same thing. Ok, so I booted up normally and logged in as root. Bingo! The command did it’s thing…or did it? I could now ping the server on the new IP. I was completely amazed, but with all my history with Mac OS X Server, I had to see it in the GUI to believe it.
I opened System Preferences>Network Settings. The old IP was still in the GUI. Ok…maybe it just needed a restart. Restarted, still the old IP remained. I changed it in the GUI, and the even gave it a restart. Why would I care about the GUI when I could ping? Mac OS X Server and I go way back. Guess what? None of my sites work. Guess what? All the configs come back fine, no errors. Guess what? You still cannot change the IP on Mac OS X Server without some pain. Thank goodness for Carbon Copy Cloner. I ended up just cloning the old server drive and putting that on the new Xserve. So close Apple, so close!
Installing and configuring Mac OS X Server is like being Larry David on Curb Your Enthusiasm. Larry has a great life, but there are always problems in the details…and the problems are unbelievable unless you see them yourself. I am still in pain from the install, the reinstall, the clone, and now onto the second clone. Apple: we love the Xserve. We love Mac OS X. But how did you screw up your “industrial strength” server OS? Let us modify the config files without worrying about the GUI eating our changes! I know I am very fortunate to not have to work with some other server OSes, but please listen to the users and let us help you build a truly “industrial strength” server. I would make this posting more humorous, but until I get a good install working, I will remain…not as happy as I could be.
I have been using Mac OS X and Mac OS X Server since the beginning. Installing Mac OS X Server 1.0 was something of a wake up call with a NeXT looking interface and this group called “wheel” that had me a little concerned because I had no clue why I would have a group called “wheel” for. Shortly after my first NeXT/UNIX experience I began to find that there were great software packages freely available and often well documented and supported that communities of people developed and maintained.
Continue reading New OS, New Community