Apache host the web server using mod_proxy, which proxy to the default webrick server for rails.
The server is RHEL 7.1, with Apache 2.4.
Rails Production Settings
1. Production key
Generate your secret key.
Either export it to your environment variable SECRET_KEY_BASE, or put it into config/secret.yml.
2. Do not uglify JS
Dependency injection in angularJS might become problematic in production settings if we enable uglify JS. The real way to fix this is keep using following programming style while coding in angular.
Here we fix it by disabling the uglify JS in production settings in rails.
Edit the config/environments/productions.rb.
3. Asset settings
Edit the config/environments/productions.rb.
In application.rb.
Apache settings
RHEL 7 Settings
At last, you have two choice, disable the selinux or simply allow the port.