A quick guide on setting up your first websites with Linux + Apache. I'll walk you through two methods:
1. Ultra Simple
Simple website in the existing /var/www/html directory
Just add files to /var/www/html
2. Apache virtualhosts (more professional, easier to manage, allows for multitenancy)
Comment out everything in the 'welcome' config file
vim /etc/httpd/conf.d/welcome.conf
Create directories
mkdir -p /var/www/test.tutorialinux.com/public_html
Copy website files to the newly created directory above
Put your virtualhost definition in the main apache config file (fine for a few sites, painful for true multitenancy)
vim /etc/httpd/conf/httpd.conf
If you don't have DNS pointing to the domain listed in your ServerName, edit /etc/hosts on the machine you want to VISIT the site from:
vim /etc/hosts
The site won't be live for other people on the web, but you'll be able to see it.
In this video, I'm using Centos (RedHat) Linux, although you can use whichever Linux distribution you like.
More Tech Courses ##
###################
Step-by-step project-based Linux course for beginners: https://www.udemy.com/course/hands-on...
Free Linux Sysadmin Course Playlist: • The Linux Basics Course: Beginner to ...
DigitalOcean referral link: https://m.do.co/c/0380a1db56a6
Patreon: / tutorialinux
Official Site & e-mail list: https://tutorialinux.com/
Twitter: / tutorialinux
Facebook: / tutorialinux
Podcast: http://kernelpanicpodcast.com
Watch video Set Up Your First Website with Apache VirtualHosts online without registration, duration hours minute second in high quality. This video was added by user tutoriaLinux 03 April 2017, don't forget to share it with your friends and acquaintances, it has been viewed on our site 72,596 once and liked it 615 people.