Ubuntu Zero to Hero Ubuntu Zero to Hero | Page 10

Configuring the website(s) Now that you have the correct directory open, you can go ahead and follow the below commands. 1.Add your website address as a folder (e.g. var/www/example.com) 2.Within your new folder, create a sub folder called 'public_html' 3.Navigate to '/etc/apache2/sites-available' 4.Copy the '000-default.conf 'to your desktop 5.Edit the file name to be yourdomain.com.conf 6.Within the file edit the server admin email (to your email address) 7.Then edit the document root (to point at your new public_html folder) 8.Finally, add these two lines (replacing 'domain.com' with your web address): ServerName domain.com ServerAlias www.domain.com 9.Open the terminal via SSH 10.Connect to your server 11.Type 'sudo a2ensite example.com.conf' (replacing example.com with your URL) 12.Restart apache by typing 'sudo service apache2 restart' Now that you've done that, you can start uploading all of your web pages, CSS and images to that folder. As soon as your domain has been pointed at the server, you'll be able to navigate to your new website. www.netshock.co.uk