User Tools

Site Tools


computing:apachesurvival

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
computing:apachesurvival [2022/05/25 17:17] oemb1905computing:apachesurvival [2024/02/20 23:00] (current) oemb1905
Line 3: Line 3:
   * **Jonathan Haack**   * **Jonathan Haack**
   * **Haack's Networking**   * **Haack's Networking**
-  * **netcmnd@jonathanhaack.com**+  * **webmaster@haacksnetworking.org**
  
 ------------------------------------------- -------------------------------------------
Line 13: Line 13:
 This tutorial is for users of Debian GNU/Linux to set up a LAMP stack, TLS encryption, and a web-server which can serve two or more websites using apache's virtual hosts.  I will also discuss how to set up basic protection on your firewall and a script that will make sure apache stays running and keep down time to a minimum.  The first step is to create two content directories for each of the websites.  Later, we will configure two virtual host configuration files in apache for each of these. Using site1.com and site2.com as an example, do the following and/pr adjust as needed:   This tutorial is for users of Debian GNU/Linux to set up a LAMP stack, TLS encryption, and a web-server which can serve two or more websites using apache's virtual hosts.  I will also discuss how to set up basic protection on your firewall and a script that will make sure apache stays running and keep down time to a minimum.  The first step is to create two content directories for each of the websites.  Later, we will configure two virtual host configuration files in apache for each of these. Using site1.com and site2.com as an example, do the following and/pr adjust as needed:  
  
-  sudo apt install apache2 php mariadb-server libapache2-mod-php+  sudo apt install apache2 php mariadb-server
   sudo mkdir -p /var/www/site1.com/public_html   sudo mkdir -p /var/www/site1.com/public_html
   sudo mkdir -p /var/www/site2.com/public_html   sudo mkdir -p /var/www/site2.com/public_html
Line 59: Line 59:
 Append something like this to the bottom: Append something like this to the bottom:
      
-  xxx.xxx.xxx.xxx site1.com hostname+  xxx.xxx.xxx.xxx site1.com site1
  
 Make sure to do this for each domain.  Check your configurations up until now and then restart the service and check if it starts: Make sure to do this for each domain.  Check your configurations up until now and then restart the service and check if it starts:
Line 100: Line 100:
   sudo a2ensite site2.com-ssl.conf   sudo a2ensite site2.com-ssl.conf
      
-Visit both sites using Firefox, and ensure they resovle - if not, check each step and debug.  Remember, you can trust the browser warning, because you set this cert up!  However, for others to access your site, you need to use a trusted authority like Let's Encrypt.  Here's how we do this: +Visit both sites using Firefox, and ensure they resolve - if not, check each step and debug.  Remember, you can trust the browser warning, because you set this cert up!  However, for others to access your site, you need to use a trusted authority like Let's Encrypt.  Here's how we do this: 
  
   sudo apt install certbot letsencrypt python3-certbot-apache   sudo apt install certbot letsencrypt python3-certbot-apache
Line 181: Line 181:
 This tutorial is a designated "Invariant Section" of the "Technotronic" section of Haack's Wiki as described on the [[https://wiki.haacksnetworking.org/doku.php?id=start|Start Page]]. This tutorial is a designated "Invariant Section" of the "Technotronic" section of Haack's Wiki as described on the [[https://wiki.haacksnetworking.org/doku.php?id=start|Start Page]].
  
- --- //[[jonathan@haacksnetworking.org|oemb1905]] 2022/05/25 11:16//+ --- //[[webmaster@haacksnetworking.org|oemb1905]] 2024/02/20 23:00//
computing/apachesurvival.1653499072.txt.gz · Last modified: 2022/05/25 17:17 by oemb1905