2

I've created a vue project using Vue Router and Vite. On the server I am using nginx. My vue project has two routes only, login and create.

I also have a bunch of directories that I would like to be displayed which are not linked to vue router, but are in /var/www/html directory.

Problem is, when I visit those pages that are not linked to vue router, they are blank unless I hard reload with CTRL F5 or visit in incognito.

Any reasons why ?

server { # root /var/www/html/homepage; #listen 80; # index index.html index.htm index.nginx-debian.html; add_header Cache-Control no-cache; server_name homepage.domain.me www.domain.balog.me; gzip on; gzip_disable "MSIE [1-6]\.(?!.*SV1)"; gzip_vary on; gzip_comp_level 7; gzip_proxied any; gzip_types text/plain text/css text/javascript image/svg+xml image/x-icon application/javascript application/x-javascript text/xml application/xml application/xml+rss application/json; location / { root /var/www/html/homepage; index index.htm index.html; include /etc/nginx/mime.types; try_files $uri $uri/ /index.html =404; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} location /api { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://127.0.0.1:3000/api; proxy_redirect off; } # listen 443 ssl; # managed by Certbot # ssl stuff down here 
1

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.