From c0f2ce34a1a722e7ebe0918c1d3a34ed71075a25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EF=BB=BFghost-from-the-past?= Date: Wed, 14 Apr 2021 16:10:58 +0200 Subject: [PATCH] Updated Install Tracks on Ubuntu 20.10 (markdown) --- Install-Tracks-on-Ubuntu-20.10.md | 68 ++++++++++++++++++++++--------- 1 file changed, 49 insertions(+), 19 deletions(-) diff --git a/Install-Tracks-on-Ubuntu-20.10.md b/Install-Tracks-on-Ubuntu-20.10.md index fa6fe24..be2116a 100644 --- a/Install-Tracks-on-Ubuntu-20.10.md +++ b/Install-Tracks-on-Ubuntu-20.10.md @@ -261,44 +261,74 @@ mysql> quit >systemctl status apache2.service
>journalctl -xe -

if apache was installed correctly and is running go with your browser to http://localhost you should see the Apache webserver page

+

if apache was installed correctly and is running go with your browser to http://localhost you should see the Apache webserver page.

For more information see [[Apache tips]]

- -

------------

Setup Apache to run your website

at /etc/apache2/sites-available/ create the file tracks.conf

you can make a copy from 000-default.conf

+

Note:

+

The default/standard port for http is 80. As I already have a web site running on port 80 the next common choice is to use port 8080 where in my case is running a VNC then finally I selected the port 8079

+

If you go for the standard port 80 you need to use 80 where I refer to 8079 and you need to remove the symbolic link "000-default.conf" in /etc/apache2/sites-enabled to have only your Tracks web "enabled" and running for port 80.


-

IMPORTANT

-

The default/standard port for http is 80.

-

As I already have a web site already running I select the port 8079

-

(the port 8080 is another usual choice, that in my case is also already in use for VNC)

-

NOTE: if you go for the standard port 80, you need to remove the symbolic link "000-default.conf" in /etc/apache2/sites-enabled to have only your Tracks web "enabled" and running for Port 80 (also you need to use 80 where I refer to 8079)

-

-
-

-

(the use of libapache2-mod-passenger makes Passenger in Apache to auto-detect the rails app)

+

Just for information the use of libapache2-mod-passenger makes Passenger in Apache to auto-detect the rails app


edit your website configuration file

-
>nano /etc/apache2/sites-available/tracks.conf
+
+>nano /etc/apache2/sites-available/tracks.conf +

------------

- <VirtualHost *:8079>
ServerName tracks.local

DocumentRoot /var/www/tracks/public
AcceptPathInfo on

ErrorDocument 403 "<h1>Site update in progress. Check back in a few minutes.</h1>"

<Directory /var/www/tracks/public>
Require all granted
AllowOverride All
</Directory>

## Logging
ErrorLog "/var/log/apache2/tracks_error.log"
ServerSignature Off
CustomLog "/var/log/apache2/tracks_access.log" combined
</VirtualHost> +
+<VirtualHost *:8079>
+ ServerName tracks.local

+ DocumentRoot /var/www/tracks/public
+ AcceptPathInfo on

+ ErrorDocument 403 "<h1>Site update in progress. Check back in a few minutes.</h1>"
+
+ <Directory /var/www/tracks/public>
+ Require all granted
+ AllowOverride All
+ </Directory>
+
+ ## Logging
+ ErrorLog "/var/log/apache2/tracks_error.log"
+ ServerSignature Off
+ CustomLog "/var/log/apache2/tracks_access.log" combined
+</VirtualHost> +

------------

now edit the file /etc/apache2/ports.conf and add the Listen for port 8079

-
>nano /etc/apache2/ports.conf
+
+>nano /etc/apache2/ports.conf +

------------

-

Listen 80
Listen 8079

<ifmodule ssl_module="">
Listen 443
</ifmodule>

<ifmodule mod_gnutls.c="">
Listen 443
</ifmodule> create link

+
+Listen 80
+Listen 8079
+
+<ifmodule ssl_module="">
+ Listen 443
+</ifmodule>
+
+<ifmodule mod_gnutls.c="">
+ Listen 443
+</ifmodule> create link +

------------

finally create a symbolic link so Apache services it

-
>cd /etc/apache2/sites-enabled
>ln -s ../sites-available/tracks.conf ./
+
+>cd /etc/apache2/sites-enabled
+>ln -s ../sites-available/tracks.conf ./ +

restart Apache

-
>systemctl restart apache2
+
+>systemctl restart apache2 +

------------

-

By default, the Passenger log file is the global (not the per-vhost) Apache error log file.

+

By default, the Passenger log file is the global (not the per-vhost) Apache error log file.

This is typically located in /var/log/apache2/error_log.