Set Up Your First Website with Apache VirtualHosts

tutoriaLinux
tutoriaLinux
72.4 هزار بار بازدید - 8 سال پیش - A quick guide on setting
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: www.udemy.com/course/hands-on-linux-self-hosted-wo… Free Linux Sysadmin Course Playlist:    • The Linux Basics Course: Beginner to ...   DigitalOcean referral link: m.do.co/c/0380a1db56a6 Patreon: www.patreon.com/tutorialinux Official Site & e-mail list: tutorialinux.com/ Twitter: twitter.com/tutorialinux Facebook: www.facebook.com/tutorialinux Podcast: kernelpanicpodcast.com/
8 سال پیش در تاریخ 1396/01/14 منتشر شده است.
72,416 بـار بازدید شده
... بیشتر