mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
Updated Installing Tracks 2.2.2 on CentOS 6.5 Minimal x86_64 (markdown)
parent
a3d9bb59ff
commit
d1df54a241
1 changed files with 0 additions and 63 deletions
|
|
@ -702,66 +702,3 @@ Set SELinux to enforcing mode. Update `/etc/selinux/config` or execute setenforc
|
|||
```
|
||||
$ sudo setenforce 1
|
||||
```
|
||||
|
||||
##Phusion Passenger, Rails, & Sub-URIs
|
||||
In the course of using ruby, rails, and passenger, you may need to create multiple sites or apps not just one. Using Passenger sub-uris will accomplish this task. In addition, when using Nginx (see below), using a sub-uri simplifies configuration and reduces hours of banging your head on your desk.
|
||||
|
||||
With Tracks, update the site.yml to use a subdir, then update Apache's configuration to reflect the virtual host shown below. So for www.somedomain.com we will use subdir tracks which result with http://www.somedomain.com/tracks.
|
||||
|
||||
Remove the comment '#' and update to read subdir: "/tracks"
|
||||
```
|
||||
$ vi /home/tracks/tracks/config/site.yml
|
||||
```
|
||||
|
||||
Update the apache2's httpd.conf, existing virtual host stanza, to read as follows:
|
||||
```
|
||||
$ sudo vi /etc/httpd/conf/httpd.conf
|
||||
|
||||
<VirtualHost *:80>
|
||||
ServerName trk.harmonson.net
|
||||
DocumentRoot /home/tracks/tracks/public
|
||||
|
||||
Alias /tracks /home/tracks/tracks/public
|
||||
|
||||
<Location /tracks>
|
||||
PassengerBaseURI /tracks
|
||||
PassengerAppRoot /home/tracks/tracks
|
||||
</Location>
|
||||
|
||||
<Directory /home/tracks/tracks/public>
|
||||
Allow from all
|
||||
# This relaxes Apache security settings.
|
||||
AllowOverride all
|
||||
# MultiViews must be turned off.
|
||||
Options -MultiViews
|
||||
# Uncomment this if you're on Apache >= 2.4:
|
||||
#Require all granted
|
||||
</Directory>
|
||||
|
||||
</VirtualHost>
|
||||
```
|
||||
|
||||
|
||||
Restart Apache for changes to take effect.
|
||||
```
|
||||
$ sudo service httpd restart
|
||||
```
|
||||
|
||||
##Nginx reverse proxy
|
||||
Nginx is a very efficient web service which I use as a reverse proxy. Below is an example of a working Nginx 1.4 location config using the Tracks build above and sub-uri /tracks. This is only the Nginx /location stanza not a complete nginx.conf configuration file.
|
||||
```
|
||||
### Tracks
|
||||
location /tracks/ {
|
||||
auth_basic "off";
|
||||
|
||||
## Set Headers
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
|
||||
## Tracks Backend
|
||||
proxy_pass http://192.168.1.111/tracks/;
|
||||
proxy_redirect off;
|
||||
}
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue