Bino Oetomo
Bino Oetomo

Reputation: 625

New instalation from source got 404

I try to install taiga from source. All component including rabbitMQ and PGSQL in a single VM. I want taiga accessed as sub-path, with access scheme http.
Installation/Configuration steps

VP IP is 192.168.1.70 and my station is at 192.168.12.26.

When I try to access http://192.168.1.70/taiga/api/v1/, JSON is showed like expected.
But when I try to access http://192.168.1.70/taiga or http://192.168.1.70/taiga/ I got HTTP 404

Here is some of my configuration

/etc/nginx/nginx.conf

    user www-data;
    worker_processes auto;
    pid /run/nginx.pid;
    include /etc/nginx/modules-enabled/*.conf;

    events {
        worker_connections 768;
        # multi_accept on;
    }

    http {

        ##
        # Basic Settings
        ##

        sendfile on;
        tcp_nopush on;
        types_hash_max_size 2048;
        # server_tokens off;

        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        ##
        # SSL Settings
        ##

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
        ssl_prefer_server_ciphers on;

        ##
        # Logging Settings
        ##

        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;

        ##
        # Gzip Settings
        ##

        gzip on;

        # gzip_vary on;
        # gzip_proxied any;
        # gzip_comp_level 6;
        # gzip_buffers 16 8k;
        # gzip_http_version 1.1;
        # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

        ##
        # Virtual Host Configs
        ##

        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
    }

/etc/nginx/sites-available/default

    server {
        listen 80 default_server;
        listen [::]:80 default_server;

            large_client_header_buffers 4 32k;
            client_max_body_size 50M;
            charset utf-8;

        root /var/www/html;

        # Add index.php to the list if you are using PHP
        index index.html index.htm index.nginx-debian.html;

        server_name _;

        location / {
            # First attempt to serve request as file, then
            # as directory, then fall back to displaying a 404.
            try_files $uri $uri/ =404;
        }

        # Frontend
        location /taiga/ {
            alias /home/taiga/taiga-front-dist/dist/;
            index index.html;
            try_files $uri $uri/ index.html =404;
            access_log /home/taiga/logs/nginx.access.log;
            error_log /home/taiga/logs/nginx.error.log;
        }

        # API
        location /taiga/api/ {
            access_log /home/taiga/logs/nginx.access.log;
            error_log /home/taiga/logs/nginx.error.log;
            proxy_set_header Host $http_host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Scheme $scheme;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_pass http://127.0.0.1:8001/api/;
            proxy_redirect off;
        }

        # Admin
        location /taiga/admin/ {
            access_log /home/taiga/logs/nginx.access.log;
            error_log /home/taiga/logs/nginx.error.log;
            proxy_set_header Host $http_host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Scheme $scheme;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_pass http://127.0.0.1:8001/admin/;
            proxy_redirect off;
        }

        # Static files
        location /taiga/static/ {
            access_log /home/taiga/logs/nginx.access.log;
            error_log /home/taiga/logs/nginx.error.log;
            alias /home/taiga/taiga-back/static/;
        }

        # Media
        location /taiga/_protected/ {
            internal;
            access_log /home/taiga/logs/nginx.access.log;
            error_log /home/taiga/logs/nginx.error.log;
            alias /home/taiga/taiga-back/media/;
            add_header Content-disposition "attachment";
        }

        # Unprotected section
        location /taiga/media/exports/ {
            alias /home/taiga/taiga-back/media/exports/;
            add_header Content-disposition "attachment";
            access_log /home/taiga/logs/nginx.access.log;
            error_log /home/taiga/logs/nginx.error.log;
        }

        location /taiga/media/ {
            proxy_set_header Host $http_host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Scheme $scheme;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_pass http://127.0.0.1:8003/;
            proxy_redirect off;
            access_log /home/taiga/logs/nginx.access.log;
            error_log /home/taiga/logs/nginx.error.log;
        }

        # Events
        location /taiga/events {
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_connect_timeout 7d;
            proxy_send_timeout 7d;
            proxy_read_timeout 7d;
            proxy_pass http://127.0.0.1:8888/events;
            access_log /home/taiga/logs/nginx.access.log;
            error_log /home/taiga/logs/nginx.error.log;
        }

    }

/home/taiga/taiga-front-dist/dist/conf.json

    {
        "api": "http://192.168.1.70/taiga/api/v1/",
        "eventsUrl": "wss://192.168.1.70/taiga/events",,
        "baseHref": "/taiga/",
        "eventsMaxMissedHeartbeats": 5,
        "eventsHeartbeatIntervalTime": 60000,
        "eventsReconnectTryInterval": 10000,
        "debug": false,
        "debugInfo": false,
        "defaultLanguage": "en",
        "themes": [
            "taiga"
        ],
        "defaultTheme": "taiga",
        "defaultLoginEnabled": true,
        "publicRegisterEnabled": true,
        "feedbackEnabled": true,
        "supportUrl": "https://community.taiga.io/",
        "privacyPolicyUrl": null,
        "termsOfServiceUrl": null,
        "maxUploadFileSize": null,
        "contribPlugins": [],
        "tagManager": {
            "accountId": null
        },
        "tribeHost": null,
        "enableAsanaImporter": false,
        "enableGithubImporter": false,
        "enableJiraImporter": false,
        "enableTrelloImporter": false,
        "gravatar": false,
        "rtlLanguages": [
            "ar",
            "fa",
            "he"
        ]
    }

/home/taiga/taiga-front-dist/dist/index.html ; head portion only

    <head>
    <meta charset="utf-8">
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="fragment" content="!">
    <base href="/taiga/">
    <!-- Main meta-->
    <title>Taiga</title>
    <meta name="description" content="Taiga is a project management platform for startups and agile developers &amp; designers who want a simple, beautiful tool that makes work truly enjoyable.">
    <meta name="keywords" content="agile, scrum, taiga, management, project, developer, designer, user experience">
    <link rel="stylesheet" href="v-1712171376723/styles/theme-taiga.css">
    <link rel="icon" type="image/png" href="v-1712171376723/images/favicon.png">
    <script type="text/javascript">
      window.prerenderReady = false;
      window.TAIGA_VERSION = 'v-1712171376723';
      window.TAIGA_USER_PILOT_TOKEN = ''
      window._taigaAvailableThemes = ["taiga"];
      
    </script>
    </head>

what to check or what to do to fix this problem?

Upvotes: 0

Views: 22

Answers (0)

Related Questions