Welcome! Log In Create A New Profile

Advanced

POST result: 404

April 30, 2020 02:03PM
This is the nginx configuration in Ubuntu 18.04 :

server {
listen 443 ssl http2 default_server;
server_name ggc.world;

ssl_certificate /etc/letsencrypt/live/ggc.world/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/ggc.world/privkey.pem; # managed by Certbot

ssl_trusted_certificate /etc/letsencrypt/live/ggc.world/chain.pem;

ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

ssl_session_timeout 5m;
#ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-
draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:50m;
#ssl_stapling on;
#ssl_stapling_verify on;

access_log /var/log/nginx/ggcworld-access.log combined;

add_header Strict-Transport-Security "max-age=31536000";
location = /favicon.ico { access_log off; log_not_found off; }

location / {
proxy_pass http://127.0.0.1:8080;
#proxy_pass http://127.0.0.1:2000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
#proxy_set_header Host $host;
}
}

server {
listen 80 default_server;
listen [::]:80 default_server;
error_page 497 https://$host:$server_port$request_uri;
server_name ggc.world;
return 301 https://$server_name$request_uri;

access_log /var/log/nginx/ggcworld-access.log combined;

add_header Strict-Transport-Security "max-age=31536000";
location = /favicon.ico { access_log off; log_not_found off; }

location / {
proxy_pass http://127.0.0.1:8080;
#proxy_pass http://127.0.0.1:2000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
#proxy_set_header Host $host;
}
}

upstream websocket {
ip_hash;
server localhost:3000;
}

server {
listen 81;
server_name ggc.world;

#location / {
location ~ ^/(websocket|websocket\/socket-io) {
proxy_pass http://127.0.0.1:4201;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwared-For $remote_addr;
proxy_set_header Host $host;

proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
}
}

upstream golang-webserver {
ip_hash;
server 127.0.0.1:2000;
}

server {
listen 3000;
server_name ggc.world;

location / {
proxy_pass http://golang-webserver;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
#proxy_set_header Host $host;
}
}

This is my vue.config.js file for the vue.js frontend:

// vue.config.js
module.exports = {
// options...
publicPath: '',
devServer: {
host: '0.0.0.0',
port: 8080,
//port: 2000,
public: 'ggc.world'
},
}

And this is port configuration for go-webserver :

server-gorillamux.go :

const (
CONN_HOST = "192.168.1.7"
CONN_PORT = "2000"
)


Compiling the frontend:

DONE Compiled successfully in 1224ms 7:55:19 PM

App running at:
- Local: http://localhost:8080
- Network: http://ggc.world/

Note that the development build is not optimized.
To create a production build, run npm run build.

And running the go-webserver:

goServer$ go run server-gorillamux.go


I get this error: POST https://ggc.world/puser/add 404

These are the last lines of the nano /var/log/nginx/ggcworld-access.log file :

36.119.16 - - [30/Apr/2020:19:56:57 +0200] "GET / HTTP/2.0" 200 694 "-" "Mozilla/5.0 (X11; Linux x86_64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36"
2.36.119.16 - - [30/Apr/2020:19:56:57 +0200] "GET /js/app.js HTTP/2.0" 200 147353 "https://ggc.world/" "Mozilla/5.0
(X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36"
2.36.119.16 - - [30/Apr/2020:19:56:58 +0200] "GET /js/chunk-vendors.js HTTP/2.0" 200 4241853 "https://ggc.world/"
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safa$
2.36.119.16 - - [30/Apr/2020:19:56:58 +0200] "GET /sockjs-node/info?t=1588269418560 HTTP/2.0" 200 79
"https://ggc.world/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.$
2.36.119.16 - - [30/Apr/2020:19:57:21 +0200] "POST /puser/add HTTP/2.0" 404 137 "https://ggc.world/" "Mozilla/5.0
(X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36"

How can I solve the problem?
Looking forward to your kind help.
Marco
Subject Author Posted

POST result: 404

MarcoI April 30, 2020 02:03PM

Re: POST result: 404

Thomas Ward April 30, 2020 02:46PM

Re: POST result: 404

MarcoI April 30, 2020 03:20PM

Re: POST result: 404

Thomas Ward April 30, 2020 03:48PM

Re: POST result: 404

MarcoI May 01, 2020 04:18AM

Re: POST result: 404

MarcoI May 01, 2020 05:53AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 76
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready