Multiple Sites Set up

Hi,


I am hoping someone can shed some light on my situation.


I used the default directory to to put all my site files and configure the website service to load my site when my people access my site via example.com


I want to create a site (and folders) specifically for the default page where users can change their password as I need to implement a password policy to increase security. I want it to have a slightly different URL for the default page for example portal.example.com


So in summary, what I think I need to do is:


Create a new site for example.com called example.com in the server app.

Put all my website files here.


Add an Additional Domain to the default "Server Website" website called portal.example.com

Add an alias to point visitors to the "Server Website" website example.com to the example.com website folders and therefore webpages.


Is there a cleaner more official way of setting this up as ideally I would like another site for my round cube webmail and any other things I need to create in future?


Many Thanks,

Henry

Mac mini, OS X El Capitan (10.11.3), Server 5.0.15

Posted on Jan 29, 2016 9:37 AM

Reply
4 replies

Jan 30, 2016 12:29 PM in response to hgelderbloem

Hi Henry,


I suggest you read the server manual.

https://help.apple.com/serverapp/mac/5.0/index.html

What you try to accomplish is (as far as I understood) what is built into the SERVER app from Apple.


If you set up a server, on a subdomain like portal.example.com then this points to the files in the folder Library/Server/Web/Data/Sites/Default

Do not change a lot there..


If you still want to host your example.com site you create a folder lets say Library/Server/Web/Data/Sites/example.com/

and put your handcrafted HTML or whatever files there.


When you access server.example.com you go to the Servers page and users can login, make wikis, pull down Profiles amongst others.

If you plan to server Mail and other services just activate them in the server.. but read the manual first.

The password policy you define in you OD (open directory settings).


In iBooks there is an excellent book by Reid Bundonis about setting up a server for your needs... or the above manual, which contains everything you need.

Yours

Pierre

Jan 30, 2016 12:10 PM in response to Pierre Froelicher1

Hi Pierre,


What I have done is set up my server with the hostname example.com so when I go to example.com it loads from Library/Server/Web/Data/Sites/Default and I already have a fully set up server running Mail amongst most of the other services so changing the host name is not a good idea as it would break things that have been long established and annoy my users.


So I need example.com to load from Library/Server/Web/Data/Sites/example.com and the Server Page (with the URL portal.example.com) to load from Library/Server/Web/Data/Sites/Default as far as I am aware, the Server page only loads from here unless there is a way to swap them around?


I had a thought to actually create a new site called portal.example.com and set a redirect to the default SSL site which loads the Server Page from the Library/Server/Web/Data/Sites/Default location. At least this way there is a discernible difference in the web addresses that my users will remember the address. Although this isn't clean (my OCD is killing me!) and the url will change once they load the page.


I may have misunderstood what you meant by:


"If you still want to host your example.com site you create a folder lets say Library/Server/Web/Data/Sites/example.com/

and put your handcrafted HTML or whatever files there.


When you access server.example.com you go to the Servers page..."


Do you mean that if I create an example.com site to load from Library/Server/Web/Data/Sites/example.com that the Server Page will then be available from server.example.com that loads from Library/Server/Web/Data/Sites/Default ?


Sorry for any confusion and thank you for your reply.

Henry

Jan 31, 2016 1:04 AM in response to hgelderbloem

Hi Henry,


Where your email gets picked up is defined in your mx records. Normally you want your emails to be smith@example.com and not smith@portal.example.com.


Normally the subdomain portal.example.com would be used for the Server apps funcionatlity, Profilemanager etc. And example.com would be your site for outsiders. With this setup you avoid the hassle of redirects.

You can still change this without major hassle.



Do you mean that if I create an example.com site to load from Library/Server/Web/Data/Sites/example.com that the Server Page will then be available from server.example.com that loads from Library/Server/Web/Data/Sites/Default ?

YES!

Yours

Pierre

Jan 31, 2016 1:10 AM in response to Pierre Froelicher1

Hi Pierre,


Thanks for your help! This worked exactly how I needed.


Just for other who are my situation:


Make sure your hostname for your server is server.example.com (where example.com is your domain name) allow all DNS updates by changing the DNS. Make sure your authoritative DNS is pointing to the new hostname.


Create a new site in Website with the domain example.com


Move your website files from the Library/Server/Web/Data/Sites/Default location to the new Library/Server/Web/Data/Sites/example.com

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.

Multiple Sites Set up

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