I have web folder with root as username and group how do I set it up to be accessed on the internet with a registered domain. Thanks for your awaithing response
You need your registered domain to have at least one A-record pointing to the public IP of your server. Install any webserver you like and let it serve files from /var/www - how to do that, depends on which software you choose. Don't use root for serving files, while static files might not be a security risk, as soon as you setup scripting languages or cgi it can result in unwanted behaviour. Are you playing locally or did you rent a server already? If you have a server in "public space" e.g. a data centre, I hope you already know what you're doing...
my registered domain is working but when i tried to access it the web server apache2 was complaining "you don't have access this server. This is from google cloud machine
my web application configuration directory is as follows. drwxr-xr-x 2 www-data www-data 4096 Feb 29 15:54 html drw-r--r-- 4 www-data www-data 4096 Mar 8 16:46 www.example.com The web browser response is as follows: Forbidden You don't have permission to access / on this server. Apache/2.4.10 (Debian) Server at 1.2.3.4 Port 80
so what's your configuration file look like? What aout the error/access log? www-data shouldn't be an issue for apache on debian to access.