e.preventDefault()
что бы страница не обновлялась. В /home/nuxt-vuetify/dist/ точно есть 404.html?
/home/nuxt-vuetify/dist# ls
404.html ceni contacts faq favicon.ico index.html _nuxt podr robots.txt sitemap.xml v.png vuetify-logo.svg
бек возвращает 200, а должен 404 надо что-то поправить в приложении:
map $sent_http_content_type $expires {
"text/html" epoch;
"text/html; charset=utf-8" epoch;
default off;
}
server { # the port nginx is listening on
server_name woodbigdata.com www.woodbigdata.com; # setup your domain here
gzip on;
gzip_types text/plain application/xml text/css application/javascript;
gzip_min_length 1000;
error_page 404 /404.html;
location = /404.html {
# Путь до директории где размещена кастомная страница 404.html
root /home/nuxt-vuetify/dist/404.html;
internal;
}
location / {
expires $expires;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 1m;
proxy_connect_timeout 1m;
proxy_pass http://127.0.0.1:8000; # set the address of the Node.js instance here
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/woodbigdata.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/woodbigdata.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = www.woodbigdata.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = woodbigdata.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name woodbigdata.com www.woodbigdata.com;
return 404; # managed by Certbot
}
root@formu:/# nginx -t
nginx: [warn] conflicting server name "www.woodbigdata.com" on 0.0.0.0:443, ignored
nginx: [warn] conflicting server name "www.woodbigdata.com" on 0.0.0.0:80, ignored
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful