Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

http and https version of same site, setup help needed

On our 10.6.x server we have our web site set up via Server Admin. Server admin allowed for the same domain to be set up twice, once for http on port 80, and once for https on port 443 using a self signed certificate. Our site was able to be browsed on either port.


We manually wrote a redirect into the site Apache files for pages including webmail and AWstats to be forced to https. In doing so the user is always asked if they want to trust the self signed certificate. We have no need for a signed certificate for our site. We do not want to force all pages to be browsed on port 443. All we want to do is force certain pages to be encrypted for use by our staff only.


I have not been able to recreate this setup in Lion or Mountain Lion in testing. I would like to get our site over to Mountain Lion.


Any suggestions how to begin? I do not know Apache but I can get at the site files from our current installation.


Thanks - Erich

Apache-OTHER, OS X Server

Posted on Aug 6, 2012 9:36 AM

Reply
13 replies

Aug 6, 2012 1:20 PM in response to Erich Wetzel

Apple still use Apache as the webserver in Mountain Lion Server. Unfortunately they no longer provide the ability to configure via a GUI many of the options you used to be able to. Server Admin in Snow Leopard was effectively a GUI tool for 'editing' the apache.conf file.


For Mountain Lion Server you are going to have to manually edit the apache.conf file. If your settings are otherwise the same i.e. host names, websites, etc. there is a good chance you could copy across your old apache.conf file.

Aug 6, 2012 1:28 PM in response to John Lockwood

The changes are clear and I agree with most that they are nice for non server users but not useful to the administrators who have enjoyed the GUI that got us a littler further along before having to edit the files manually.


What to edit was what I wanted to confirm. I'll see if I can replace the apache.conf and let you know how it goes.


Thanks - Erich

Aug 6, 2012 1:52 PM in response to Erich Wetzel

Erich Wetzel wrote:


John,

Are you referring to httpd.conf? If not where is apache.conf?


Oops my bad, it has been httpd.conf for a long time even in Snow Leopard.


See http://smartwebdeveloper.com/mac/httpd-conf-location-mac


If I remember in the now dim and distant past, when the Apache organisation only did a webserver it was apache.conf but they now have multiple projects so the appropriate configuration file is now specific to httpd i.e. the webserver.

Aug 6, 2012 2:04 PM in response to John Lockwood

rewriting those configs manualy will make problems for future GUI editation (I went through that on Lion). After some time I discovered that the most problems are caused by running community tools. Therefore the easiest solution for me, that helped to keep me using gui was assigning another IP to the network interface and in default web with wiki limit using only to one IP. than on second IP I was able set all other webs I needed, without conflicting with community tools.

Also what I did was, I use www.domain.com on the second IP and leaving wiki on hostname.domain.com:443 than I am using www.domain.com as main portal for all other webs.

Aug 6, 2012 2:27 PM in response to Andílek

Andilek,


I think I follow you.


To create another ip I assume you set went to System Preferences > Network and created a new item. Selected the already running ethernet interface (example en0) and gave it a new address. So if it was already running en0 as 10.10.10.10, I would call the second instance 10.10.10.11 and the server is reached at both addresses on the same interface? I imagine we then port forward our firewall on both 80 and 443 to the 10.10.10.11 address for www.domain.com. This way you keep the server default page accessible but with hosted web sites available too?


As an alternative can you apply the second address to a second ethernet port on a Mac Pro and connect both to the same switch?


That does keep me out of the httpd.conf configuration but makes the network more complicated.

Aug 7, 2012 7:35 PM in response to Erich Wetzel

Erich Wetzel wrote:


We do not want to force all pages to be browsed on port 443. All we want to do is force certain pages to be encrypted for use by our staff only.


It sounds like you just need to add one or two Redirect or RedirectMatch rules on the insecure site redirecting certain pages to the secure site. This can be done in Server.app -> Web -> insecure site -> Redirects. You don't need to do any manual configuration file editing for this.

Aug 9, 2012 7:13 AM in response to Blaidd Drwg

Blaidd Drwg,


Thank you for the idea. If we set up the redirects as you suggest it will skew our statistics and show the errors associated with the two rule types offered.


Our current site files contain rewrite_mod rules that I can easily apply to the new site files.


I want to avoid editing httpd.conf if I can.


This all used to be easier when the GUIs were more sophisticated. I am gradually working up to enough knowledge to get into the CLI with confidence.


Thanks

http and https version of same site, setup help needed

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