/home/username/public_html/test-app/log/production.log
Download this file and open it to see what errors are occurring
/home/username/public_html/test-app/log/production.log
# cd /home/username/public_html/test-app
# passenger-config restart-app
/home/username/solr/solr-5.3.0/server/solr/blacklight-core/conf/solrconfig.xml
<requestDispatcher handleSelect="true" >
<requestParsers enableRemoteStreaming="false" multipartUploadLimitInKB="2048" />
</requestDispatcher>
<requestHandler name="search" class="solr.SearchHandler" default="true">
<!-- default values for query parameters can be specified, these
will be overridden by parameters in the request
-->
<lst name="defaults">
<str name="defType">dismax</str>
<str name="echoParams">explicit</str>
<int name="rows">10</int>
<str name="q.alt">*:*</str>
<str name="mm">2<-1 5<-2 6<90%</str>
<!-- this qf and pf are used by default, if not otherwise specified by
client. The default blacklight_config will use these for the
"keywords" search. See the author_qf/author_pf, title_qf, etc
below, which the default blacklight_config will specify for
those searches. You may also be interested in:
http://wiki.apache.org/solr/LocalParams
-->
<str name="qf">
field1_txt
field2_txt
field3_txt
</str>
<str name="pf">
field1_txt
field2_txt
field3_txt
</str>
<!--
<str name="author_qf">
author_unstem_search^200
author_addl_unstem_search^50
author_t^20
author_addl_t
</str>
<str name="author_pf">
author_unstem_search^2000
author_addl_unstem_search^500
author_t^200
author_addl_t^10
</str>
<str name="title_qf">
title_unstem_search^50000
subtitle_unstem_search^25000
title_addl_unstem_search^10000
title_t^5000
subtitle_t^2500
title_addl_t^100
title_added_entry_unstem_search^50
title_added_entry_t^10
title_series_unstem_search^5
title_series_t
</str>
<str name="title_pf">
title_unstem_search^500000
subtitle_unstem_search^250000
title_addl_unstem_search^100000
title_t^50000
subtitle_t^25000
title_addl_t^1000
title_added_entry_unstem_search^500
title_added_entry_t^100
title_series_t^50
title_series_unstem_search^10
</str>
<str name="subject_qf">
subject_topic_unstem_search^200
subject_unstem_search^125
subject_topic_facet^100
subject_t^50
subject_addl_unstem_search^10
subject_addl_t
</str>
<str name="subject_pf">
subject_topic_unstem_search^2000
subject_unstem_search^1250
subject_t^1000
subject_topic_facet^500
subject_addl_unstem_search^100
subject_addl_t^10
</str>
-->
<int name="ps">3</int>
<float name="tie">0.01</float>
<!-- NOT using marc_display because it is large and will slow things down for search results -->
<str name="fl">
id,
score,
field1_txt,
field2_txt,
field3_txt
</str>
<str name="facet">true</str>
<str name="facet.mincount">1</str>
<str name="facet.limit">40</str>
<!--
<str name="facet.field">subject_topic_facet</str>
-->
<str name="spellcheck">true</str>
<str name="spellcheck.dictionary">default</str>
<str name="spellcheck.onlyMorePopular">true</str>
<str name="spellcheck.extendedResults">true</str>
<str name="spellcheck.collate">false</str>
<str name="spellcheck.count">5</str>
</lst>
<!-- In addition to defaults, "appends" params can be specified
to identify values which should be appended to the list of
multi-val params from the query (or the existing "defaults").
-->
<!-- In this example, the param "fq=instock:true" would be appended to
any query time fq params the user may specify, as a mechanism for
partitioning the index, independent of any user selected filtering
that may also be desired (perhaps as a result of faceted searching).
NOTE: there is *absolutely* nothing a client can do to prevent these
"appends" values from being used, so don't use this mechanism
unless you are sure you always want it.
-->
<!--
<lst name="appends">
<str name="fq">inStock:true</str>
</lst>
-->
<!-- "invariants" are a way of letting the Solr maintainer lock down
the options available to Solr clients. Any params values
specified here are used regardless of what values may be specified
in either the query, the "defaults", or the "appends" params.
In this example, the facet.field and facet.query params would
be fixed, limiting the facets clients can use. Faceting is
not turned on by default - but if the client does specify
facet=true in the request, these are the only facets they
will be able to see counts for; regardless of what other
facet.field or facet.query params they may specify.
NOTE: there is *absolutely* nothing a client can do to prevent these
"invariants" values from being used, so don't use this mechanism
unless you are sure you always want it.
-->
<!--
<lst name="invariants">
<str name="facet.field">cat</str>
<str name="facet.field">manu_exact</str>
<str name="facet.query">price:[* TO 500]</str>
<str name="facet.query">price:[500 TO *]</str>
</lst>
-->
<!-- If the default list of SearchComponents is not desired, that
list can either be overridden completely, or components can be
prepended or appended to the default list. (see below)
-->
<!--
<arr name="components">
<str>nameOfCustomComponent1</str>
<str>nameOfCustomComponent2</str>
</arr>
-->
<arr name="last-components">
<str>spellcheck</str>
</arr>
</requestHandler>
<!-- for requests to get a single document; use id=666 instead of q=id:666 -->
<requestHandler name="document" class="solr.SearchHandler" >
<lst name="defaults">
<str name="echoParams">all</str>
<str name="fl">*</str>
<str name="rows">1</str>
<str name="q">{!raw f=id v=$id}</str> <!-- use id=666 instead of q=id:666 -->
</lst>
</requestHandler>
<!-- For Advanced Search -->
<requestHandler name="advanced" class="solr.SearchHandler" >
<lst name="defaults">
<str name="defType">lucene</str>
<str name="echoParams">explicit</str>
<str name="sort">score desc, pub_date_sort desc, title_sort asc</str>
<str name="df">text</str>
<str name="q.op">AND</str>
<str name="qs">1</str>
<!-- used for dismax query parser -->
<str name="mm">1</str>
<str name="ps">3</str>
<float name="tie">0.01</float>
<!-- for user query terms in author text box -->
<str name="qf_author">
author_unstem_search^200
author_addl_unstem_search^50
author_t^20
author_addl_t
</str>
<str name="pf_author">
author_unstem_search^2000
author_addl_unstem_search^500
author_t^200
author_addl_t^10
</str>
<!-- for user query terms in title text box -->
<str name="qf_title">
title_unstem_search^50000
subtitle_unstem_search^25000
title_addl_unstem_search^10000
title_t^5000
subtitle_t^2500
title_addl_t^100
title_added_entry_unstem_search^50
title_added_entry_t^10
title_series_unstem_search^5
title_series_t
</str>
<str name="pf_title">
title_unstem_search^500000
subtitle_unstem_search^250000
title_addl_unstem_search^100000
title_t^50000
subtitle_t^25000
title_addl_t^1000
title_added_entry_unstem_search^500
title_added_entry_t^100
title_series_t^50
title_series_unstem_search^10
</str>
<!-- for user query terms in subject text box -->
<str name="qf_subject">
subject_topic_unstem_search^200
subject_unstem_search^125
subject_topic_facet^100
subject_t^50
subject_addl_unstem_search^10
subject_addl_t
</str>
<str name="pf_subject">
subject_topic_unstem_search^2000
subject_unstem_search^1250
subject_t^1000
subject_topic_facet^500
subject_addl_unstem_search^100
subject_addl_t^10
</str>
<!-- for user query terms in number text box -->
<str name="qf_number">isbn_t</str>
<!-- for user query terms in keyword text box -->
<str name="qf_keyword">text</str>
<str name="pf_keyword">text^10</str>
<!-- NOT using marc_display because it is large and will slow things down for search results -->
<str name="fl">
id,
score,
author_display,
author_vern_display,
format,
isbn_t,
language_facet,
lc_callnum_display,
material_type_display,
published_display,
published_vern_display,
pub_date,
title_display,
title_vern_display,
subject_topic_facet,
subject_geo_facet,
subject_era_facet,
subtitle_display,
subtitle_vern_display,
url_fulltext_display,
url_suppl_display,
</str>
<str name="facet">true</str>
<str name="facet.mincount">1</str>
<str name="facet.limit">10</str>
<str name="facet.field">format</str>
<str name="facet.field">lc_1letter_facet</str>
<str name="facet.field">lc_alpha_facet</str>
<str name="facet.field">lc_b4cutter_facet</str>
<str name="facet.field">language_facet</str>
<str name="facet.field">pub_date</str>
<str name="facet.field">subject_era_facet</str>
<str name="facet.field">subject_geo_facet</str>
<str name="facet.field">subject_topic_facet</str>
<str name="spellcheck">true</str>
<str name="spellcheck.dictionary">subject</str>
<str name="spellcheck.onlyMorePopular">true</str>
<str name="spellcheck.extendedResults">true</str>
<str name="spellcheck.collate">false</str>
<str name="spellcheck.count">5</str>
</lst>
<arr name="last-components">
<str>spellcheck</str>
</arr>
</requestHandler>
<requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
<requestHandler name="standard" class="solr.StandardRequestHandler" />
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
<requestHandler name="/admin/ping" class="solr.PingRequestHandler">
<lst name="invariants">
<str name="q">solrpingquery</str>
</lst>
<lst name="defaults">
<str name="echoParams">all</str>
</lst>
</requestHandler>
<!-- Spell Check
The spell check component can return a list of alternative spelling
suggestions.
http://wiki.apache.org/solr/SpellCheckComponent
-->
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
<str name="queryAnalyzerFieldType">textSpell</str>
<!-- Multiple "Spell Checkers" can be declared and used by this
component
-->
<!-- a spellchecker built from a field of the main index, and
written to disk
-->
<lst name="spellchecker">
<str name="name">default</str>
<str name="field">spell</str>
<str name="spellcheckIndexDir">./spell</str>
<str name="buildOnOptimize">true</str>
</lst>
<lst name="spellchecker">
<str name="name">author</str>
<str name="field">author_spell</str>
<str name="spellcheckIndexDir">./spell_author</str>
<str name="accuracy">0.7</str>
<str name="buildOnOptimize">true</str>
</lst>
<lst name="spellchecker">
<str name="name">subject</str>
<str name="field">subject_spell</str>
<str name="spellcheckIndexDir">./spell_subject</str>
<str name="accuracy">0.7</str>
<str name="buildOnOptimize">true</str>
</lst>
<lst name="spellchecker">
<str name="name">title</str>
<str name="field">title_spell</str>
<str name="spellcheckIndexDir">./spell_title</str>
<str name="accuracy">0.7</str>
<str name="buildOnOptimize">true</str>
</lst>
<!-- a spellchecker that uses a different distance measure -->
<!--
<lst name="spellchecker">
<str name="name">jarowinkler</str>
<str name="field">spell</str>
<str name="distanceMeasure">
org.apache.lucene.search.spell.JaroWinklerDistance
</str>
<str name="spellcheckIndexDir">spellcheckerJaro</str>
</lst>
-->
<!-- a spellchecker that use an alternate comparator
comparatorClass be one of:
1. score (default)
2. freq (Frequency first, then score)
3. A fully qualified class name
-->
<!--
<lst name="spellchecker">
<str name="name">freq</str>
<str name="field">lowerfilt</str>
<str name="spellcheckIndexDir">spellcheckerFreq</str>
<str name="comparatorClass">freq</str>
<str name="buildOnCommit">true</str>
-->
<!-- A spellchecker that reads the list of words from a file -->
<!--
<lst name="spellchecker">
<str name="classname">solr.FileBasedSpellChecker</str>
<str name="name">file</str>
<str name="sourceLocation">spellings.txt</str>
<str name="characterEncoding">UTF-8</str>
<str name="spellcheckIndexDir">spellcheckerFile</str>
</lst>
-->
</searchComponent>
/home/username/solr/solr-5.3.0
# bin/solr stop -all
# bin/solr restart
/home/username/public_html/test-app/app/controllers/catalog_controller.rb
config.default_solr_params = {
qt: 'search',
rows: 10
}
config.per_page = [10,20,50,100]
config.default_document_solr_params = {
qt: 'document',
## These are hard-coded in the blacklight 'document' requestHandler
fl: '*',
rows: 1,
q: '{!term f=id v=$id}'
}
# solr field configuration for search results/index views
config.index.title_field = 'title_display'
config.index.display_type_field = 'format'
# solr field configuration for document/show views
#config.show.title_field = 'title_display'
#config.show.display_type_field = 'format'
# solr field configuration for search results/index views
config.index.title_field = 'field1_txt'
#config.index.display_type_field = 'format'
# solr field configuration for document/show views
config.show.title_field = 'field1_txt'
#config.show.display_type_field = 'format'
config.add_facet_field 'field1Facet', label: 'Field 1', limit: 10
config.add_facet_field 'field2Facet', label: 'Field 2', limit: 15
config.add_facet_fields_to_solr_request!
config.add_index_field 'field2_txt', label: 'Field 2'
config.add_index_field 'field3_txt', label: 'Field 3', link_to_search: 'field3Facet'
config.add_show_field 'field2_txt', label: 'Field 2'
config.add_show_field 'field3_txt', label: 'Field 3'
config.add_search_field('title') do |field|
# solr_parameters hash are sent to Solr as ordinary url query params.
field.solr_parameters = { :'spellcheck.dictionary' => 'title' }
# :solr_local_parameters will be sent using Solr LocalParams
# syntax, as eg {! qf=$title_qf }. This is neccesary to use
# Solr parameter de-referencing like $title_qf.
# See: http://wiki.apache.org/solr/LocalParams
field.solr_local_parameters = {
qf: '$title_qf',
pf: '$title_pf'
}
end
config.add_search_field('author') do |field|
field.solr_parameters = { :'spellcheck.dictionary' => 'author' }
field.solr_local_parameters = {
qf: '$author_qf',
pf: '$author_pf'
}
end
# Specifying a :qt only to show it's possible, and so our internal automated
# tests can test it. In this case it's the same as
# config[:default_solr_parameters][:qt], so isn't actually neccesary.
config.add_search_field('subject') do |field|
field.solr_parameters = { :'spellcheck.dictionary' => 'subject' }
field.qt = 'search'
field.solr_local_parameters = {
qf: '$subject_qf',
pf: '$subject_pf'
}
end
config.add_sort_field 'score desc, field1_txt asc', label: 'Relevance'
config.add_sort_field 'field1_txt asc', label: 'Field 1'
$ ssh root@example.com
# cd /home/username/solr/solr-5.3.0
example.com:8983
# bin/solr start -noprompt
# bin/solr create -c blacklight-core -d basic_configs
/home/username/solr/solr-5.3.0/server/solr/blacklight-core
/home/username/solr/solr-5.3.0/server/solr/blacklight-core/conf/schema.xml
<field name="field1_txt" type="text_general" indexed="true" stored="true" multiValued="true"/>
<field name="field1Facet" type="string" indexed="true" stored="false" multiValued="true"/>
<field name="field2_txt" type="text_general" indexed="true" stored="true" multiValued="false"/>
<copyField source="field1_txt" dest="field1Facet"/>
$ bin/solr stop -all
$ bin/solr restart
/home/username/solr/solr-5.3.0/
$ bin/post -c blacklight-core data.json
# passenger-config about ruby-command
/usr/local/apache/conf/userdata/std/2_2/username/example.com/
# Tell Apache and Passenger where your app's 'public' directory is
DocumentRoot /home/username/www/test-app/public
PassengerRuby /home/username/.rvm/gems/ruby-2.2.4/wrappers/ruby
# Relax Apache security settings
<Directory /home/username/www/test-app/public>
Allow from all
Options -MultiViews
# Uncomment this if you're on Apache >= 2.4:
#Require all granted
</Directory>
DocumentRoot /home/username/public_html
# To customize this VirtualHost use an include file at the following location
Include "/usr/local/apache/conf/userdata/std/2_2/username/example.com/test-app.conf"
$ ssh root@example.com# service httpd restart
# rails generate blacklight:install --devise
# bundle exec rake assets:precompile db:migrate RAILS_ENV=production
/home/username/public_html/test-app/Gemfile
gem 'blacklight', "~> 6.0"
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]
# bundle install --no-deployment
# cd /home/username/public_html/test-app# bundle exec rake secret/home/username/public_html/test-app/config/secrets.yml“<%= ENV["SECRET_KEY_BASE"] %>”# git add .
# git commit -m “Updated database.yml and secrets.yml files”
# chmod 700 config db
# chmod 600 config/database.yml config/secrets.yml
/home/username/www/test-app/config/database.ymlhost: 127.0.0.1
database: username_test-app_production
username: username_tester
# yum install -y git$ ssh username@example.com# cd /home/username/public_html/test-app# git init# git config --global user.name "Your name"# git config --global user.email youremail@email.com# git add .# git commit -m "Initial git commit"$ ssh username@example.com# cd /home/username# cd www# rails new test-app -d mysql# cd test-app$ ssh root@example.com
# uname -r
2.6.32-573.22.1.el6.x86_64
# grep SELINUX /etc/selinux/config
# SELINUX= can take one of these three values:
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
SELINUXTYPE=targeted
# ssh root@example.com
# yum install curl-devel
# ssh username@example.com
# cd /home/username/
# gem install passenger
Fetching: passenger-5.0.28.gem (100%)
Building native extensions. This could take a while...
Successfully installed passenger-5.0.28
Parsing documentation for passenger-5.0.28
Installing ri documentation for passenger-5.0.28
Done installing documentation for passenger after 64 seconds
1 gem installed
# passenger-install-apache2-module
Welcome to the Phusion Passenger Apache 2 module installer, v5.0.28.
This installer will guide you through the entire installation process. It
shouldn't take more than 3 minutes in total.
Here's what you can expect from the installation process:
1. The Apache 2 module will be installed for you.
2. You'll learn how to configure Apache.
3. You'll learn how to deploy a Ruby on Rails application.
Don't worry if anything goes wrong. This installer will advise you on how to
solve any problems.
Press Enter to continue, or Ctrl-C to abort.
--------------------------------------------
Which languages are you interested in?
Use <space> to select.
If the menu doesn't display correctly, press '!'
‣ ⬢ Ruby
⬢ Python
⬢ Node.js
⬡ Meteor
--------------------------------------------
Checking whether there are multiple Apache installations...
Multiple Apache installations detected!
You are about to install Phusion Passenger against the following
Apache installation:
Apache 2.2.31
apxs2 : /usr/bin/apxs
Executable: /usr/local/apache/bin/httpd
However, 2 other Apache installation(s) have been found on your system:
* Apache 2.2.31
apxs2 : /usr/local/apache.backup/bin/apxs
Executable: /usr/local/apache/bin/httpd
* Apache 2.2.31
apxs2 : /usr/local/apache/bin/apxs
Executable: /usr/local/apache/bin/httpd
Are you sure you want to install against Apache 2.2.31 (/usr/bin/apxs)? [y/n]:
--------------------------------------------
Almost there!
Please edit your Apache configuration file, and add these lines:
LoadModule passenger_module /home/username/.rvm/gems/ruby-2.2.4/gems/passenger-5.0.28/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /home/username/.rvm/gems/ruby-2.2.4/gems/passenger-5.0.28
PassengerDefaultRuby /home/username/.rvm/gems/ruby-2.2.4/wrappers/ruby
</IfModule>
After you restart Apache, you are ready to deploy any number of web
applications on Apache, with a minimum amount of configuration!
Press ENTER when you are done editing.
--------------------------------------------
# BELOW WAS ADDED AFTER PASSENGER WAS INSTALLED AGAINST
# Apache 2.2.31
# apxs2 : /usr/bin/apxs
# Executable: /usr/local/apache/bin/httpd
LoadModule passenger_module /home/username/.rvm/gems/ruby-2.2.4/gems/passenger-5.0.28/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /home/username/.rvm/gems/ruby-2.2.4/gems/passenger-5.0.28
PassengerDefaultRuby /home/username/.rvm/gems/ruby-2.2.4/wrappers/ruby
</IfModule>
Validating installation...
* Checking whether this Passenger install is in PATH... ✓
* Checking whether there are no other Passenger installations... ✓
* Checking whether Apache is installed... ✓
* Checking whether the Passenger module is correctly configured in Apache... ✓
Everything looks good. :-)
# service httpd restart
# /home/username/.rvm/gems/ruby-2.2.4/wrappers/ruby /home/username/.rvm/gems/ruby-2.2.4/gems/passenger-5.0.28/bin/passenger-config validate-install --validate-apache2 --invoked-from-installer
# /home/username/.rvm/gems/ruby-2.2.4/gems/passenger-5.0.28/bin/passenger-memory-stats
----- Passenger processes -----
PID VMSize Private Name
-------------------------------
# gem uninstall passenger