Description:
Update README.rdoc
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r726:438ea3c69fc9 - - 1 file changed: 1 inserted, 1 deleted
@@ -79,49 +79,49 | |||
|
79 | 79 | We are almost done. The last step is to set up apache and Phusion so that cafe-grader is served by apache. |
|
80 | 80 | |
|
81 | 81 | === Deploy cafe-grader on Phusion passenger via apache |
|
82 | 82 | |
|
83 | 83 | This will install a Passenger mod for apache. You can start by visiting https://www.phusionpassenger.com/library/walkthroughs/deploy/ruby/ownserver/apache/oss/install_passenger_main.html and fllow through the guide. We have reproduce the step here for Ubuntu 18.04. For other version, please select the appropriate one on the previous link. |
|
84 | 84 | |
|
85 | 85 | The deploy is divided into two parts: Installing Passenger and deploying the app. |
|
86 | 86 | |
|
87 | 87 | 1. Installing Passenger as a mod for apache via PPA and enable it. |
|
88 | 88 | |
|
89 | 89 | cafe@grader:~$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 561F9B9CAC40B2F7 |
|
90 | 90 | cafe@grader:~$ sudo apt-get install -y apt-transport-https ca-certificates |
|
91 | 91 | cafe@grader:~$ sudo sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger bionic main > /etc/apt/sources.list.d/passenger.list' |
|
92 | 92 | cafe@grader:~$ sudo apt-get update |
|
93 | 93 | cafe@grader:~$ sudo apt-get install -y libapache2-mod-passenger |
|
94 | 94 | cafe@grader:~$ sudo a2enmod passenger |
|
95 | 95 | |
|
96 | 96 | |
|
97 | 97 | cafe@grader:~$ sudo apache2ctl restart |
|
98 | 98 | |
|
99 | 99 | Finally, we should check that passenger is installed correctly. Run the following command and fix anything as suggested by the command. |
|
100 | 100 | |
|
101 | 101 | cafe@grader:~$ sudo /usr/bin/passenger-config validate-install |
|
102 | 102 | |
|
103 | - Deploying the app. First, we determine the exact location of our ruby that is installed via RVM. | |
|
103 | + 2. Deploying the app. First, we determine the exact location of our ruby that is installed via RVM. | |
|
104 | 104 | |
|
105 | 105 | cafe@grader:~$ passenger-config about ruby-command |
|
106 | 106 | passenger-config was invoked through the following Ruby interpreter: |
|
107 | 107 | Command: /home/cafe/.rvm/gems/ruby-2.3.7/wrappers/ruby |
|
108 | 108 | Version: ruby 2.3.7p456 (2018-03-28 revision 63024) [x86_64-linux] |
|
109 | 109 | To use in Apache: PassengerRuby /home/cafe/.rvm/gems/ruby-2.3.7/wrappers/ruby |
|
110 | 110 | To use in Nginx : passenger_ruby /home/cafe/.rvm/gems/ruby-2.3.7/wrappers/ruby |
|
111 | 111 | To use with Standalone: /home/cafe/.rvm/gems/ruby-2.3.7/wrappers/ruby /usr/bin/passenger start |
|
112 | 112 | |
|
113 | 113 | Then, take note of the path after "Command". For this guide, it is /home/cafe/.rvm/gems/ruby-2.3.7/wrappers/ruby |
|
114 | 114 | |
|
115 | 115 | Assuming that cafe-grader is installed at /home/cafe/cafe_grader, we will edit the Apache's site config file /etc/apache2/site-enabled/000-default.conf as follow. |
|
116 | 116 | |
|
117 | 117 | <VirtualHost *:80> |
|
118 | 118 | #ServerName www.example.com |
|
119 | 119 | |
|
120 | 120 | ServerAdmin webmaster@localhost |
|
121 | 121 | # dont forget to change the document root |
|
122 | 122 | DocumentRoot /home/cafe/cafe_grader/web/public |
|
123 | 123 | |
|
124 | 124 | ErrorLog ${APACHE_LOG_DIR}/error.log |
|
125 | 125 | CustomLog ${APACHE_LOG_DIR}/access.log combined |
|
126 | 126 | |
|
127 | 127 | # add Passenger |
You need to be logged in to leave comments.
Login now