#1323: Link Routing - WEBrick / Mongrel in combination with the use of a special Port

Type: BugItem Feature: Infrastructure Tags: colivre
ScheduledFor: N/A Assigned to:   Sites:  
Priority: 0 Status: Pending  

Description of the bug

Some links are incomplete, there is no port in the url. To fix the bug temporarily, we have modified /app/models/environment.rb and changed localhost to the IP-address of the server. After that, the links in WEBrick will be right. But with Mongrel this modification doesn't work. It may be, that there is a problem "top_url".

Steps to reproduce

  1. step 1

Install Noosfero on Linux, configure Mongrel for a use with port 3000 and start with ./script/server production.start

or start WEBrick with:

./script/server webrick --port 3000 --binding 127.0.0.1

  1. step 2

klick on the link "NoosferoBeta" in the navigation_bar.

or

klick on one user/group on the right site.

  1. step 3

Testing environment

some different systems: (one Reference:)

- Ubuntu Linux - Rails 2.1.0 - Noosfero 0.20.0

maybe that it have relevance:

at the moment we don't use a DNS-Entry for addressing. The addressing is realized only with IP-adresses.

-- RonnyKursawe -- 20 Nov 2009

Hi Ronny,

Thanks for your report. I've unchecked the releases from the ScheduledFor field because we don't know yet when it is going to be solved.

Here are some tips I think might help: we have some assumptions for production mode that are probably not documented:

  • the server is accessible on port 80
  • there is at least one domain associated with each environment being served.

The hardcoded "localhost" on app/model/environment.rb could probably be replaced by a configuration that is "localhost" by default but can be modified in config/local.rb (or perhaps this configuration should mention all default parts of URL's and include both hostname and port).

-- AntonioTerceiro - 23 Nov 2009

Hi Antonio

it will be a problem for us, to use only port 80 for production. But first I would try to use the file /config/local.rb. May be, that the problem will fixed with this. Do you have a example for this file, that I can configure the host an the port?

-- RonnyKursawe - 26 Nov 2009

hello Ronny, actuallty this configuration is not possible yet, what I meant is that we could change the hardcoded "localhost" to use a configuration with a default value that one can override in config/local.rb

the config/local.rb is a Ruby file that gets loaded in the end of config/environment.rb, so inside there the local administrator can override potentially anything. One thing that we already did it to override the default locale in that file:

Noosfero.default_locale = 'pt'

-- AntonioTerceiro - 27 Nov 2009
Add comment
You need to login to be able to comment.
 

ActionItemForm edit

Title Link Routing - WEBrick / Mongrel in combination with the use of a special Port
ActionItemType BugItem
Priority Low
Tags colivre
Feature Infrastructure
ResponsibleDevelopers
ScheduledFor N/A
AffectsVersion
Status Pending
Ticket SAC:
Topic revision: r7 - 22 May 2015, UnknownUser

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