oot@ubuntu-s-2vcpu-4gb-120gb-intel-lon1-01:~/Epos-F# sudo ls -l /root/Epos-F/build
total 516
-rwxr-xr-x 1 www-data www-data 447 May 20 09:05 asset-manifest.json
-rwxr-xr-x 1 www-data www-data 424159 May 20 09:03 cloud.png
-rw-r--r-- 1 www-data www-data 639 May 20 09:05 index.html
-rwxr-xr-x 1 www-data www-data 79838 May 20 09:03 logo.png
-rwxr-xr-x 1 www-data www-data 471 May 20 09:03 manifest.json
-rwxr-xr-x 1 www-data www-data 67 May 20 09:03 robots.tx
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi there,
It’s not recommended to place your website’s content in the root directory (
/root
). Instead, it’s best practice to move it to the/var/www/html
directory, which is the default directory for serving web content on many web servers, including Nginx.Move the Build Files: Move your build files from
/root/Epos-F/build
to/var/www/html/Epos-F
. You can do this using the following commands:Update Permissions: Ensure the files have the correct ownership and permissions. They should be owned by the
www-data
user and group:Update Nginx Configuration: Edit your Nginx configuration to point to the new directory. Open your Nginx configuration file, which is usually found in
/etc/nginx/sites-available/
or/etc/nginx/conf.d/
. You can use a text editor likenano
:Update the
root
directive to point to the new location:Restart Nginx: After making these changes, restart the Nginx service to apply the new configuration:
Check Nginx Status: Ensure that Nginx is running and has no configuration errors:
If you encounter any errors, check the Nginx error log for more details:
Let me know how it goes!
- Bobby