Thread: Stijn!!
View Single Post

RKDinOKC
RKDinOKC is offline
The Stick
 
RKDinOKC's Avatar
 
Join Date: Dec 2007
Location: Someplace Safe?
Posts: 17,328
Garage
Holy Cow, I sometimes surprise myself.

Running a Mac Mini for my web/mail/ftp server. My mail and ftp server are different from the canned Apple stuff. It didn't matter because the Apple Server Manager let you set specific IPs for specific services. After Apple discontinued the xServe Rack mount servers they made a Server App installable on any Mac for just $20.

The problem with the new Server App setup was there was no way to specify specific IP addresses for specific services. Instead when activated it gloomed up all the IP interfaces on the machine and no other host apps like mail or ftp would work.

After digging around found that you could edit the apache config file and virtual host config file to restrict the web based services of the new Server App to whatever IP or IPs you wanted. The only hicky was that any time there was an OS or Server App update you had to go back and re-edit the two config files. No big deal, there aren't that many updates.

Now this is where I surprised me.

The last upgrades changed the Service App stuff. After the update I edited the two config files and the ftp and mail worked, BUT the Apache web server now reported nobody had permissions to access any of the web sites.

Put the original apache config files back. The web server worked again, but mail and ftp had turned their services off. Manually turned them on and low and behold they stayed on. The server worked each with their own IP like before. Apple changed something because before this upgrade trying to turn the services on the other apps it put up an error saying the ports were in use.

Then, restarted the server. Dang it, every time the server restarted I had to log in and restart the mail and ftp services. Not a good scenario. Thought it was weird mail and ftp wouldn't run at startup, but would start manually after the system was up. It didn't do that before.

Figured it had to do with settings at system start up. Dug around and found that the launchd program that starts up all the apps manages and reserves all the IPs and ports. Apache reserved all the IPs before the mail/ftp apps. In the startup preference file for Apache found launchd uses a httpd config file instead of the apache config file. In the launchd preferences Apache says it uses the ports/IPs only as needed. That means the httpd config was glooming up all the IP addresses then released the IPs Apache wasn't actually using. That's why I could login then run the services after everything had started up.

Edited the httpd config file to only use the one IP I use for web services like I had done with the apache config before. Restarted the computer half expecting to get the permissions error for the web server again but Bam..web and mail and ftp are up and running. And without having to login and manually start mail and ftp. Restarted it again, and everything is still hunky dory.

Don't know what Apple did to cause the permissions errors on the web server with the apache config files set to listen on a specific IP on port 80, or why it is using a different config file for initial startup. All I know is that it now works!

Am I a geek or what?
__________________
Richard aka "The Stick"
06 Cayenne S Titanium Edition

Last edited by RKDinOKC; 06-17-2017 at 04:05 AM..
Old 06-17-2017, 03:22 AM
  Pelican Parts Catalog | Tech Articles | Promos & Specials    Reply With Quote #139365 (permalink)