Passenger needs to know which Ruby command to use to run the app. We will determine the command and then add it to the Apache configuration files.
1. In Terminal, located in the app's home directory, determine the Ruby command for Passenger with the following command:
The text after "Command:" in the response you receive will be used later.
2. Open a new FTP connection logged in as root user to example.com.
3. In the new FTP connection, go to the folder located at /usr/local/apache/conf/
4. Create a folder “user data” in the conf folder and then the necessary subdirectories so that the following path exists:
5. Create a file in Text Wrangler (or some other text editor) and save it as "test-app.conf".
6. Add the following into the test-app.conf file (replace the path after "PassengerRuby" with the output from step 1 above):
7. Use the FTP program to upload the test-app.conf file to the path /usr/local/apache/conf/userdata/std/2_2/username/example.com/
8. Download the Apache configuration file located at /usr/local/apache/conf/httpd.conf
9. Edit the <VirtualHost> section that contains
so that the includes statement at the bottom looks like:
Now the test-app.conf values will override the default values in the VirtualHost section.
10. Use the FTP program to replace the httpd.conf file on the server with the one you edited.
11. Open a new Terminal window and ssh as root:
12. Restart the Apache service:
13. Check example.com in a browser to see if anything is showing yet.
It probably won’t show anything yet. We need to set up the Solr index and edit the Solr configuration files!
Previous post: Install Blacklight in the app
Next post: Update Solr schema configuration
1. In Terminal, located in the app's home directory, determine the Ruby command for Passenger with the following command:
# passenger-config about ruby-command
The text after "Command:" in the response you receive will be used later.
2. Open a new FTP connection logged in as root user to example.com.
3. In the new FTP connection, go to the folder located at /usr/local/apache/conf/
4. Create a folder “user data” in the conf folder and then the necessary subdirectories so that the following path exists:
/usr/local/apache/conf/userdata/std/2_2/username/example.com/
5. Create a file in Text Wrangler (or some other text editor) and save it as "test-app.conf".
6. Add the following into the test-app.conf file (replace the path after "PassengerRuby" with the output from step 1 above):
# 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>
7. Use the FTP program to upload the test-app.conf file to the path /usr/local/apache/conf/userdata/std/2_2/username/example.com/
8. Download the Apache configuration file located at /usr/local/apache/conf/httpd.conf
9. Edit the <VirtualHost> section that contains
DocumentRoot /home/username/public_html
so that the includes statement at the bottom looks like:
# 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"
Now the test-app.conf values will override the default values in the VirtualHost section.
10. Use the FTP program to replace the httpd.conf file on the server with the one you edited.
11. Open a new Terminal window and ssh as root:
$ ssh root@example.com12. Restart the Apache service:
# service httpd restart
13. Check example.com in a browser to see if anything is showing yet.
It probably won’t show anything yet. We need to set up the Solr index and edit the Solr configuration files!
Previous post: Install Blacklight in the app
Next post: Update Solr schema configuration
No comments:
Post a Comment