Deploying the Vue front-end project today has been reporting an error of 500 and the main page cannot be displayed.
One thought that his dist location was not accessed correctly or the location of nginx.conf was written incorrectly, and finally found out! It's a question of permissions! !
I want to access the address of /home/ubuntu/myapp/ruoyi/ruoyi-ui/dist, and there is no problem in writing the path.
Finally, when I saw the information in the error.log, I suddenly realized that it was a permission problem.
This is really pitiful.
The default permission settings in nginx.conf are as shown in the figure, on the first line! ! is commented out, then the default means that there is no permission . . So can't access.
All you need to do is set the permissions to root and you're done!
The front-end page can finally be accessed normally! ! ! It's not easy!