how to modify some configuration settings in the osm web site ?

Tom Hughes tom at compton.nu
Tue Nov 29 12:23:38 UTC 2016


On 29/11/16 10:59, Jean-Claude Jouffre wrote:

> 1) The ruby server is only listening from 127.0.0.1 so how can we
> configure it to listen from the real IP adress ?
>
> 2) How can we configure it to listen from the 80 port instead of the
> 3000 one ?
>
> 3) Is it possible to configure it to listen to the 443 port to (as for
> the production osm web site https://www.openstreetmap.org) ?

Well the builtin server is only really for development. If you want to 
run a proper server you should look at the various production grade 
servers (such as passenger) that are available for rails apps.

> 4) The web site requires tiles from somewhere else. How can we configure
> it to act itself as a tile server (as described on
> https://switch2osm.org/serving-tiles/manually-building-a-tile-server-14-04)
> ? But, in this case I don't see how ruby will be able to listen on the
> 80 port for the web site and apache too for the tile server.

Well that depends on what you select for the previous step, but one way 
is to put a proxy in front. Of course if you use apache+passenger as the 
rails server then you can just do it all in apache.

> 5) My goal is to use the API server, so has something else to be
> installed too ?

The rails code can run the API but out production servers use cgimap for 
some calls.

> 6) How to configure the web site to use the test database (osm_test) ?
> May be setting a linux variable RAILS_ENV to test (to be read by
> preinitializer.rb file) ?

Again that depends on the server. With passenger you set RailsEnv in the 
apache configuration.

> 7) Why are only 2 databases created by the "bundle exec rake db:create"
> command instead of the 3 described in example.database.yml file ?

Well you don't say which two it's creating, but to be honest I would 
only have expected it to create one for the current environment.

> 8) Last : is there some other documentations ressources (where such
> questions were asked before and answered) ?

Well much of what you are asking are generic rails/apache/whatever 
questions and not OSM specific.

Tom

-- 
Tom Hughes (tom at compton.nu)
http://compton.nu/



More information about the rails-dev mailing list