Refresh The browser app is not working. giving 404 error when I deployed the app in to tomcat.

ForumCategory: Specific to a themeRefresh The browser app is not working. giving 404 error when I deployed the app in to tomcat.
Ganesh asked 6 years ago

When we build the prod build Iam getting prod folder in dist. and it is running well. When I copy that ‘prod’ folder in to my tomcat webapps, Iam able to run it but when I refresh the browser it showing 404 error. I have changed the base path also. But it is not working. Iam using cmd “gulp serve.prod –color –config-env prod” or “gulp build.prod –color –config-env prod” to build the app.
Can any one please help me on this.
Thanks in advance.

1 Answers
admin Staff answered 6 years ago

Hi Ganesh,

Try this,
1: create .htaccess file
2: write the following content
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ – [L]
RewriteRule ^ /index.html [L]
3: make this available in the build folder so that apache can use it.

Ganesh replied 6 years ago

Please anyone help me on this issue.

Ganesh replied 6 years ago

Please anyone help me on this issue.

Ganesh replied 6 years ago

Thanks for your response.

I have created sample.htaccess file in “tomcat/webapps/prod” repository. but it is showing same error(404)

My build path is like this

tomcat/webapps/prod

tomcat
–webapps
–prod
–assets
–css
–fonts
–js
index.html
sample.htaccess

Please help me on this issue.

 

 

Thanks in advance.