Server 5.0.3 redirecting default websites to port 34543

This specifically affected my roundcube install from topicdesk. The roundcube webapp was installed against the default ssl website in server 4.x and worked just fine. 80 requests were automatically redirected to 443 and 443 had a permanent redirect to change webmail.example.com to https://webmail.example.com/webmail


Now after the upgrade to 5.0.3 the urls direct to webmail.example.com:34543/webmail and leave off the https:// which of course breaks everything. The /Library/Server/Web/Config/apache2/sites/ folder now contains .conf files for 0000_127.0.0.1_34543 and 0000_127.0.0.1_34580 as well as the old 0000_and_443 and 0000_any_80 .conf files used previously.

Posted on Sep 18, 2015 10:11 AM

Reply
43 replies

Sep 18, 2015 12:54 PM in response to Morphire

The 0000_and_443 and 0000_any_80 .conf files are not enabled. They have the .prev extension. At least on my server.


Also note the following:

If you have virtual hosts, 0000_yourIPaddress_34580_yourDomainName.conf and 34543 files set the virtual host to 127.0.0.1 instead of _yourIPaddress_.

The virtual_host_global.conf file sets the ports the server is listening on to 34580 and 34543 for your web sites' ip addresses. Including one for 127.0.0.1.

Access_log now logs 127.0.0.1 as the remote IP address of your web site visitor instead of the real IP address IF they access your web site without a host name. That is, domain.com instead of www.domain.com. If they access via www (or any host name) their IP address is logged correctly. With the "bonus" that they are directed to the default web site's pages instead of the one they should be accessing.

Sep 18, 2015 4:09 PM in response to DazeConfusedAndLost

It appears there is a typo in the 0000_ipAddress_domain_name.conf files logging 127.0.0.1 as the remote IP address instead of the actual remote IP address to the access_log. Here is a simple fix.


Change this line in those virtual host config files:

CustomLog /var/log/apache2/access_log combinedvhost

to:

CustomLog /var/log/apache2/access_log combinedvhostproxy


Restart the web site services via the Server UI.


I can't find the template that generated the files, but this should stick until you make a change to the web site via the Server UI.

Sep 19, 2015 10:27 AM in response to DazeConfusedAndLost

Same issue here. I'm not clear on the precise fix. In my dir ./apache2/sites I see these conf files:


0000_127.0.0.1_34543_.conf

0000_127.0.0.1_34580_.conf

0000_127.0.0.1_34580_proxy.hostname.private.conf

virtual_host_global.conf


along with all the .conf.prev for any_443 and the like.


It doesn't look like editing any of the port 35480 files will fix the redirect issue. Which files require mods? Should the any_443_.conf.prev be moved to .conf files? Do you mind posting a bash history of the fix?

Sep 19, 2015 10:53 AM in response to essandess

My "fix" was to fix the logging issue where all traffic seems to come from 127.0.0.1 - technically, that is true. Apple changed the way the web server works in the current version of Server (5.0.3.) Here is a direct quote from an exchange with someone from the Server Engineering Team:


"The custom sites are listening behind a proxy listening on ports 80/443. The custom sites themselves are in a separate Apache instance listening on 127.0.0.1 34580/34543. Some of this is documented in /Library/Server/Web/Config/apache2/ReadMe.txt"


You will want to change the CustomLog line in the 0000_website_IP_address_34580.conf, and 0000_website_IP_address34543.conf only if you want the access_log to correctly reflect the IP address of your website visitors. If accurate visitor IP address logging is not important to you, you can leave it alone.


The any_80/433.conf.prev files are no longer used. The current ones all have 34543 or 34580 in the file name.


Sorry if my post regarding fixing logging caused any confusion.

Sep 19, 2015 3:11 PM in response to essandess

Can you tell me where this redirection (80 requests were automatically redirected to 443 and 443 had a permanent redirect to change webmail.example.com to https://webmail.example.com/webmail) is taking place? Is it the https that is breaking the webapp or is the webapp still trying to listen on 443?


The OP sounded like the webapp is still listening on 443.

Sep 19, 2015 3:35 PM in response to Morphire

You've identified the problem, and we're having it too.


Before upgrading to Server 5.0.3 our install had a single website:

users coming to the site via http://website.domain.edu on port 80 were redirected to the SSL version on port 443

this worked without any issues

After upgrading to Server 5.0.3 users who come to the site viahttp://website.domain.edu/somedirectory receive

see :34580 inserted into the address, which fails.

And users who type https://website.domain.edu/somediretory

see :34543 inserted into the address, which fails.

Has anyone figured out what's going on here or how to fix it?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Server 5.0.3 redirecting default websites to port 34543

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.