Before web hosting you need to read about setting up a secure web server
Here is a tutorial about Linux Internet Web Server and Domain Configuration Tutorial
Start your own web hosting company/ How to become a web host
Steps For Web Hosting Setup
Webhsoting is very competitive but I found it works well because I am webdesigner and I put my own clients on my hosting.
Setup Time: about 3 hours (depends on server speeds)
Ingredients: cpanel license $38 a month, whmcs license $15.95 per month (optional), Cent Os $free, dedicated server (varies too much to price out, I found some at dell for $349 that work awesome think they are T110, and bought on ebay HP dl380 for $100 those rock), merchant account or paypal ( I use authorize.net, to keep people on my site and not to leave for payment), Domain and SSL (at godaddy about $50 per year for both)
Lets Get Started
1. Install Centos ( enable gnome, disable se linux, disable firewall)
2. Log onto gnome desktop and configure eth0 with your ip, dns, gateway etc
open up browser on centos and do a find my ip so you know you have correct static ip configurred. After this is done u can disconnect monitor keyboard etc to server.
3. Go to normal desktop pc now and download putty.exe , enter ip of server, root, and password
4. Run cmd to install cpanel (provided by your cpanel reseller). Cpanel takes about an hour to install so be patient
5. After install is complete go to your ip / whm
6. Setup nameservers, hostname we use something like server7.123onlinenow dot com ( I will discuss nameservers later in article)
7. From here I wont say how to setup because its different for everyone but some keypoints are enable bruteforce protection, setup host access control and go threw easy apache update to configure based on your likings.
SSL and Name Servers:
Assuming you have godaddy domain and SSL
1.create nameservers ns1 and ns2.yourdomain dot com
Login into godaddy, select your domain, and go to domain manager
2. On bottom left go to Host Summary and click add
3. you need 2 static ips for this, for the subdomain type ns1 or ns2 and enter the ip. After this is setup on that same domain set the nameservers to those nameservers ns1.yourdomain dot com etc......
Now lets setup SSL
1.Login into your cpanel / WHm and generate a CSR under the SSL menus
2. Copy and paste CSR into godaddy
3. Godaddy will issue you a SSL, copy and paste that into SSL setup in cpanel/ whm "select user to be nobody"
4. manage service ssl certificates and use that ssl in their so your connections to cpanel, webmail, ftp are secure
I do this on a daily bases and never knew how extensive it was until I started typing lmao! Hope this helps. If anyone needs help you can catch me on my live support 123onlinenow (dot) com or use the contact form, I usually respond within an hour
Goodluck and happy learning, dont give up, beleive me I have wanted to many times!