Running taiga on Ubuntu+Apache

1,237 views
Skip to first unread message

gtak...@gmail.com

unread,
Apr 21, 2016, 4:32:02 PM4/21/16
to taigaio
Hello,

I've tried to install Taiga on Ubuntu 14.04 + Apache 2.4.7. I followed the production installation process and it was without any complications. The thing is that if I try to access the Taiga at http://taiga.mydomain.com, it redirects me to http://taiga.mydomain.com/error. In the browser console I see:

http://localhost:8000/api/v1/stats/discover net::ERR_CONNECTION_REFUSED
http://localhost:8000/api/v1/projects?discover_mode=true&order_by=-total_fans_last_week net::ERR_CONNECTION_REFUSED
http://localhost:8000/api/v1/projects?discover_mode=true&order_by=-total_activity_last_week net::ERR_CONNECTION_REFUSED
http://localhost:8000/api/v1/projects?discover_mode=true&is_featured=true net::ERR_CONNECTION_REFUSED






And this is how my apache vhost conf looks like:

<VirtualHost *:80>
        ServerName taiga.mydomain.com
        DocumentRoot /home/taiga/taiga-front-dist/dist/

        RewriteCond %{REQUEST_URI} ^/api(.*)
        RewriteRule .* http://127.0.0.1:8001/api%1 [P,QSA]

        RewriteCond %{REQUEST_URI} ^/admin(.*)
        RewriteRule .* http://127.0.0.1:8001%{REQUEST_URI} [P,QSA]

        RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
        RewriteRule . /index.html [L]

        <Directory /home/taiga/taiga-front-dist/dist/>
                Options FollowSymLinks MultiViews
                AllowOverride All
                Order Deny,Allow
                Allow from All
        </Directory>
</VirtualHost>

Has anybody tried to run Taiga on Ubuntu+Apache? Please, could anybody somehow help me with my problem? Every advice is appreciated.

Thanks. 
Gabriel

David Barragán

unread,
Apr 21, 2016, 4:52:09 PM4/21/16
to gtak...@gmail.com, taigaio
What do you have in conf.json??? I thing that your apiUrl is wrong.

--
Please help us keep the Taiga.io Community open and inclusive, follow our Code of Conduct:
https://github.com/taigaio/code-of-conduct/blob/master/CODE_OF_CONDUCT.md
---
You received this message because you are subscribed to the Google Groups "taigaio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taigaio+u...@googlegroups.com.
To post to this group, send email to tai...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/taigaio/acbf653c-d4e4-498e-97fe-e6b06497d1e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

---

 
David Barragán Merino  
Engineer

www.kaleidos.net/FFF8E7

gtak...@gmail.com

unread,
Apr 21, 2016, 4:55:48 PM4/21/16
to taigaio, gtak...@gmail.com
This is the URL in conf.json: http://localhost:8000/api/v1/

Dňa štvrtok, 21. apríla 2016 22:52:09 UTC+2 David Barragán napísal(-a):

David Barragán

unread,
Apr 21, 2016, 5:03:43 PM4/21/16
to gtak...@gmail.com, taigaio
So according to your Apache conf (sorry, but long ago I don't use apache) thsi url should be http://taiga.mydomain.com/api/v1/


For more options, visit https://groups.google.com/d/optout.

gtak...@gmail.com

unread,
Apr 21, 2016, 5:23:28 PM4/21/16
to taigaio, gtak...@gmail.com
Unfortunately, everything remains the same. Just the errors are with the domain name:

http://taiga.mydomain.com:8000/api/v1/stats/discover net::ERR_CONNECTION_REFUSED
http://taiga.mydomain.com:8000/api/v1/projects?discover_mode=true&order_by=-total_fans_last_week net::ERR_CONNECTION_REFUSED
http://taiga.mydomain.com:8000/api/v1/projects?discover_mode=true&order_by=-total_activity_last_week net::ERR_CONNECTION_REFUSED
http://taiga.mydomain.com:8000/api/v1/projects?discover_mode=true&is_featured=true net::ERR_CONNECTION_REFUSED



Dňa štvrtok, 21. apríla 2016 23:03:43 UTC+2 David Barragán napísal(-a):

gtak...@gmail.com

unread,
Apr 21, 2016, 5:27:38 PM4/21/16
to taigaio, gtak...@gmail.com
Looks like I've got the solution - I had to remove the port 8000 from the URL in conf.json. Thanks!

Dňa štvrtok, 21. apríla 2016 23:23:28 UTC+2 gtak...@gmail.com napísal(-a):

David Barragán

unread,
Apr 21, 2016, 5:31:10 PM4/21/16
to gtak...@gmail.com, taigaio
yes, the url was wrong and I remove the port too


For more options, visit https://groups.google.com/d/optout.

gtak...@gmail.com

unread,
Apr 21, 2016, 5:32:33 PM4/21/16
to taigaio, gtak...@gmail.com
Thanks. There is one more problem - for example when I try to log in, the request address gives me 404. Log from browser console:

http://taiga.mydomain.com/api/v1/auth/register



Dňa štvrtok, 21. apríla 2016 23:31:10 UTC+2 David Barragán napísal(-a):

gtak...@gmail.com

unread,
Apr 21, 2016, 5:44:15 PM4/21/16
to taigaio, gtak...@gmail.com
It started working when I changed the Apache vhost file like this:

<VirtualHost *:80>
        ServerAdmin ad...@domain.com
        ServerName taiga.domain.com

        #SSLEngine On
        #SSLCertificateChainFile         /etc/ssl/certs/{chain certificate file}
        #SSLCACertificateFile           /etc/ssl/certs/{CA certificate file}
        #SSLCertificateFile             /etc/ssl/certs/{hostname certificate file}
        #SSLCertificateKeyFile           /etc/ssl/private/{hostname certificate key file}

        DocumentRoot /home/taiga/taiga-front-dist/dist/

        Alias /static /home/taiga/taiga-back/static
        Alias /media /home/taiga/taiga-back/media

        <Directory /home/taiga/taiga-front-dist/dist/>
                AllowOverride All
                Require all granted
        </Directory>

        # If you have taiga directory under separate user
        # use MPM ITK and run the VirtualHost under correct user/group permissions
        <IfModule mpm_itk_module>
                AssignUserId taiga_ws taiga_ws
        </IfModule>

        # For proxying you need modules "proxy", "proxy_http", "remoteip"
        ProxyPreserveHost On
        RemoteIPHeader X-Real-IP
        RemoteIPInternalProxy 127.0.0.0/8 ::1

        <Location /api>
                ProxyPass http://127.0.0.1:8001/api
                ProxyPassReverse http://127.0.0.1:8001/api

                <IfModule mod_expires.c>
                        ExpiresActive On
                        ExpiresDefault "now"
                </IfModule>/IfModule>
                <IfModule mod_headers.c>
                        Header set Cache-Control "no-cache, must-revalidate"    env=no-cache-headers
                        Header set Pragma        "no-cache"                     env=no-cache-headers
                        Header set Expires       "Sat, 1 Jan 2000 00:00:00 GMT" env=no-cache-headers
                </IfModule>
        </Location>

        <Location /admin>
               ProxyPass http://127.0.0.1:8001/admin
               ProxyPassReverse http://127.0.0.1:8001/admin

                ExpiresActive On
                ExpiresDefault "now"
                Header set Cache-Control "no-cache, must-revalidate"    env=no-cache-headers
                Header set Pragma        "no-cache"                     env=no-cache-headers
                Header set Expires       "Sat, 1 Jan 2000 00:00:00 GMT" env=no-cache-headers
        </Location>

        # For "ws://" and "wss://" you need to have proxy_wstunnel module enabled
        <Location /events>
                ProxyPass ws://127.0.0.1:8888/events
        </Location>

        # Will redirect all requests non-static, non-media, non-api and non-events (websocket) to index.html
        # You need mod_rewrite to be enabled

       RewriteEngine on
        RewriteCond %{REQUEST_URI} !^/admin(.*)
        RewriteCond %{REQUEST_URI} !^/api(.*)
        RewriteCond %{REQUEST_URI} !^/events(.*)
        RewriteCond %{REQUEST_URI} !^/static(.*)
        RewriteCond %{REQUEST_URI} !^/media(.*)
        RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f

        RewriteRule . /index.html [L]
        LogLevel warn
        CustomLog '|/usr/bin/rotatelogs /home/taiga/logs/taiga.apache.access.log 86400' combinedLogLevel warn
        CustomLog '|/usr/bin/rotatelogs /home/taiga/logs/taiga.apache.access.log 86400' combined
</VirtualHost>

<VirtualHost *:80>
        ServerName taiga.domain.com

        # Important to keep the last slash so the redirect passes relative URL correctly
        #RedirectPermanent / https://{hostname}/
</VirtualHost>



Dňa štvrtok, 21. apríla 2016 23:32:33 UTC+2 gtak...@gmail.com napísal(-a):
Reply all
Reply to author
Forward
0 new messages