Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Deploy build-dist to ngnix - only html-page will be shown


I want to deploy the build "dist" to production.
In production i have installed a nginx and configured it like examples for vue-apps.
Wenn request the page only the index.html will be delivered - without any js and css

This is my nginx block

root /var/www/<domain>/html/dist;
#index index.html index.htm index.nginx-debian.html;
index index.html;

charset utf-8;

server_name <domain>;

location /venser-app/ {
root /var/www/<domain>/html/dist;
try_files $uri $uri/ /index.html;
}


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (3)


Can you show the html site ? Are you using absolute or relative paths? like

<link rel="stylesheet" href="/style.css">

or

<link rel="stylesheet" href="./style.css">


And whats the error on your console ?



if its absolute path like /filename then try changing it to ./filename



Hi Heico,

Thank you for reaching out to us.

Typically, these errors occur when deploying your app on a relative path without updating the app's base path.

In the Metronic Vue version, the default base path is /metronic8/react/demo1/. If you're deploying your app to the server's root folder, you can set the base path to /.

Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(