Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Previous revision
sesipod:linux:debian:newsslweb [2018/03/18 05:52]
sesipod:linux:debian:newsslweb [2020/03/25 13:47] (current)
sesipod
Line 1: Line 1:
 +==== Installing SSL web server and setting up domains ====
  
 +  OS: Debian 9.3 --> newer | x64 netinstall
 +  Date: 03-25-2020
 +
 +---
 +
 +==== INSTALLING PHP SOURCE ====
 +
 +  apt install ca-certificates apt-transport-https gnupg sudo -y 
 +
 +  wget -q https://​packages.sury.org/​php/​apt.gpg -O- | apt-key add -
 +
 +  echo "deb https://​packages.sury.org/​php/​ buster main" | tee /​etc/​apt/​sources.list.d/​php.list
 +
 +
 +==== Install apache2 / php ====
 +
 +  apt-get install apache2 php7.4 php7.4-mbstring libapache2-mod-php7.4 php7.4-mcrypt php7.4-xml
 +
 +  a2enmod ssl
 +
 +  a2dissite 000-default.conf
 +
 +  rm /​etc/​apache2/​sites-available/​000-default.conf
 +
 +  nano /​etc/​apache2/​sites-available/​000-default.conf
 +
 +  <​VirtualHost *:80>
 +    ServerAdmin webmaster@localhost
 +    DocumentRoot /​var/​www/​html
 +  </​VirtualHost>​
 +
 +  mkdir /​etc/​apache2/​websites
 +
 +----
 +
 +==== Setup sesipod.info ====
 +
 +  nano /​etc/​apache2/​sites-available/​1-sesipod-info.conf
 +
 +  <​VirtualHost *:80>
 +          ServerName sesipod.info:​80
 +          Redirect permanent / https://​sesipod.info/​
 +  </​VirtualHost>​
 +  ​
 +  <​Directory /​var/​www/​sesipod.info/>​
 +          Options Indexes FollowSymLinks
 +          AllowOverride All
 +          Require all granted
 +  </​Directory>​
 +  ​
 +  <​VirtualHost *:443>
 +          ServerName sesipod.info:​443
 +          SSLEngine on
 +          SSLCertificateFile /​root/​ssl/​sesipod.info.cer
 +          SSLCertificateKeyFile /​root/​ssl/​sesipod.info.key
 +          DocumentRoot /​var/​www/​sesipod.info
 +  </​VirtualHost>​
 +
 +  echo '​include /​etc/​apache2/​sites-available/​1-sesipod-info.conf'​ >> /​etc/​apache2/​apache2.conf
 +
 +  mkdir /​var/​www/​sesipod.info
 +
 +  chown -R www-data:​www-data /​var/​www/​sesipod.info
 +
 +  chmod -R g+s /​var/​www/​sesipod.info
 +
 +    *data directory:
 +      -yourwiki>​ chmod -R 775 data/
 +      -yourwiki>​ chown -R www-data:​www-data data/
 +      -yourwiki>​ chown -R www-data:​www-data conf/
 +  *everything below the data directory:
 +      -yourwiki/​data>​ chmod 2775 {attic,​cache,​index,​locks,​media,​meta,​pages,​tmp}
 +      -yourwiki/​data>​ chown www-data:​www-data {attic,​cache,​index,​locks,​media,​meta,​pages,​tmp}
 +
 +----
 +
 +==== Setup GamingTogether ====
 +
 +  nano /​etc/​apache2/​sites-available/​2-gamingtogether-us.conf
 +
 +  <​VirtualHost *:80>
 +          ServerName gamingtogether.us:​80
 +          Redirect permanent / https://​gamingtogether.us/​
 +  </​VirtualHost>​
 +  ​
 +  <​Directory /​var/​www/​gamingtogether.us/>​
 +          Options Indexes FollowSymLinks
 +          AllowOverride All
 +          Require all granted
 +  </​Directory>​
 +  ​
 +  <​VirtualHost *:443>
 +          ServerName gamingtogether.us:​443
 +          SSLEngine on
 +          SSLCertificateFile /​root/​ssl/​sesipod.info.cer
 +          SSLCertificateKeyFile /​root/​ssl/​sesipod.info.key
 +          DocumentRoot /​var/​www/​gamingtogether.us
 +  </​VirtualHost>​
 +
 +  echo '​include /​etc/​apache2/​sites-available/​2-gamingtogether-us.conf'​ >> /​etc/​apache2/​apache2.conf
 +
 +  mkdir /​var/​www/​gamingtogether.us
 +
 +  chown -R www-data:​www-data /​var/​www/​gamingtogether.us
 +
 +  chmod -R g+s /​var/​www/​gamingtogether.us
 +
 +----