assep
By:
assep

how to run virtual host refer to website app base on ionic

September 26, 2017 106 views
Nginx Ubuntu

i have have two app first node js and this is running well with pm2, second app is mobile app base on ionic url m.forher.co.id, how i run this app ? error log is connection refused with 127.0.0.1:7712.

here is config on sites-enabled
server {
listen 80;

        server_name www.forher.co.id forher.co.id;



        rewrite ^ http://m.forher.co.id$request_uri? redirect;

    }

and

    server {
        listen 80;

        server_name m.forher.co.id;



         client_max_body_size 200M;

        location / {
            include /etc/nginx/mime.types;
            client_max_body_size 200M;
            proxy_pass http://localhost:7712;
            proxy_buffers 32 25m;
            proxy_busy_buffers_size 25m;
            proxy_buffer_size 24m;
            proxy_ignore_headers "Cache-Control" "Expires";
            proxy_max_temp_file_size 0;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection '';
            proxy_set_header Host $http_host;
            proxy_set_header X-Real-IP $remote_addr;

            proxy_cache_bypass $http_upgrade;
            proxy_read_timeout 240000;
            proxy_connect_timeout 240000;
            proxy_send_timeout 240000;
            proxy_intercept_errors off;
            send_timeout 2400000;

        }
    }

i dont know to listen port to this app. because is just like html usually. thanks for answering

Be the first one to answer this question.