Q: Server 5.0.4 Default Ports Changes
Hi,
After an auto-update of Server App to 5.0.4, i noticed all my websites stops working.
I was looking in my vhosts files and noticed that now, server changes the default ports to 34580 and 34543 (SSL) and also noticed that in every website the vhosts files changes their names to something like: 0000_127.0.0.1_34580_domain.com.conf. Opening each file, i also noticed the following:
<VirtualHost 127.0.0.1:34580>
ServerName domain.pt:34580
(...)
So, accessing my domain.com it is redirected to: domain.com:34580 (if this port is open in my vlan). The problem is that changing to my old vhosts files, all websites are redirected to default.
How can i put the server app as it was, working on 80 and 443? How can i make server to auto create vhosts files with correct parameters?
Thanks for your help.
Regards
Mozack
Mac mini, OS X Mountain Lion (10.8.2), OSX Server 2.2
Posted on Sep 21, 2015 4:16 PM
Hi Mo-zack,
If you have a complex reverse proxy configuration, then adapting that configuration to Server 5 will probably take some work. The general tradeoff is: the GUI provides an easy-to-use way to set up basic / commonly used configurations, and you should generally expect that anything configured purely by the GUI should be maintained for you by Server, which means those configurations should be automatically updated to adapt to changes in newer Server versions. On the flip side, doing things with Server that can't be done with the GUI (I'm assuming your configuration falls into this category) requires a deeper understanding of the configuration, and usually requires more work than a pure GUI configuration. Additionally, because those configurations might contain elements not supported by the GUI, there is risk of breakage when a newer version comes along that is substantially different, because the upgrade scripts don't account for those unsupported elements. Sometimes even if everything is done in the GUI, there are bugs that can cause breakage, which is why testing and backups are important.
Getting your configurations to work in Server 5 is probably the same scale of work as it was for Server 4, it's just that now you have an environment based on a different set of assumptions, so the configurations needs to account for those differences. I suspect that your configs can be adapted for Server 5, but whether that's a worthwhile effort for you is something only you can decide. If you do attempt this, I would suggest taking time to learn the ins and outs of the 'webapps' mechanism, as that is probably the best place to define web service configurations that are supported by Apple. If you want to roll back to Server 4, plucking Server.app out of a backup should do the trick, although you may want to get a clean slate by removing Server and moving /Library/Server aside before running Server 4 and re-introducing your custom config and site resources. If you instead choose to use a different server platform, there will be more 'manual labor' involved at every turn, in exchange for a much more explicitly defined environment that changes less frequently than Server changes.
Hope this helps,
-dre
Posted on Sep 23, 2015 7:04 PM