Setting a Domain to the Environment or some Profile

You must use the Noosfero Console to follow this steps.

Any Profile (person, community, enterprise) or Environment can have its won domain, or a collection of domains. The entity domains are registered inside its domains list attribute. See this examples:

Setting the Default Environment domain

>> d = Domain.new( :name => "softwarelivre.org", :is_default => true )
>> Environment.default.domains << d
>> Environment.default.save

Setting the Richard Stalman's profiles domain

>> # Setting the Richard Stalman's profiles domain:
>> p = Person['rms']
>> p.domains << Domain.new( :name => "stallman.org", :is_default => true )
>> p.save

Setting the Foo's community domain

>> # Setting the Foo's community domain:
>> p = Community['foo']
>> p.domains << Domain.new( :name => "foo.org.br", :is_default => true )
>> p.save

Well, you may know that personal domain feature is only useful if your server response for the user domain, otherwise you are sending the visitors away on any link for this user.

Setting Apache

To softwarelivre.org/foo answer like foo.org.br

<VirtualHost *:8080>
  ServerName www.foo.org.br
  Redirect / http://foo.org.br
</VirtualHost>

<VirtualHost *:8080>
  ServerName softwarelivre.org
  ServerAlias foo.org.br

  RewriteEngine On
  RewriteCond %{HTTP_HOST} softwarelivre.org
...
  RewriteRule ^/foo/(.*)$ http://foo/$1 [R,L]
...
</VirtualHost>


Add comment
You need to login to be able to comment.
 
Topic revision: r5 - 14 Apr 2017, PauloSantana

irc Talk with Devs Now!

%IF{"$'WIKINAME'!='WikiGuest'" then="

♥ I Care

%DBQUERY{"(topic='^ActionItem[0-9]+') AND whocares=~'WikiGuest' AND Status!='Done' AND Status!='Rejected'" format=" $formfield(Title)" separator="$n---$n" }%
Filter ♥ AIs
"}%

 
Translations: English
Search on Docs:
   
ActionItem Search:

Copyright © 2007-2018 by the Noosfero contributors
Colivre - Cooperativa de Tecnologias Livres