Virtual Host And Certbot in WSL2: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
Line 17: Line 17:
  ln -s /mnt/d/etc/apache2/chorke/conf.sites.all.d/00-dev.chorke.org.conf\
  ln -s /mnt/d/etc/apache2/chorke/conf.sites.all.d/00-dev.chorke.org.conf\
       /etc/apache2/sites-enabled/00-dev.chorke.org.conf
       /etc/apache2/sites-enabled/00-dev.chorke.org.conf
 
  ln -s /mnt/d/etc/apache2/chorke/conf.sites.all.d/01-api.chorke.org.conf\
  ln -s /mnt/d/etc/apache2/chorke/conf.sites.all.d/01-api.chorke.org.conf\
       /etc/apache2/sites-enabled/01-api.chorke.org.conf
       /etc/apache2/sites-enabled/01-api.chorke.org.conf
 
  ln -s /mnt/d/etc/apache2/chorke/conf.sites.all.d/02-dev.chorke.com.conf\
  ln -s /mnt/d/etc/apache2/chorke/conf.sites.all.d/02-dev.chorke.com.conf\
       /etc/apache2/sites-enabled/02-dev.chorke.com.conf
       /etc/apache2/sites-enabled/02-dev.chorke.com.conf
 
  ln -s /mnt/d/etc/apache2/shahed/conf.sites.all.d/03-dev.shahed.biz.conf\
  ln -s /mnt/d/etc/apache2/shahed/conf.sites.all.d/03-dev.shahed.biz.conf\
       /etc/apache2/sites-enabled/03-dev.shahed.biz.conf
       /etc/apache2/sites-enabled/03-dev.shahed.biz.conf
ln -s /mnt/d/etc/apache2/chorke/conf.sites.all.d/00-dev.chorke.org-le-ssl.conf\
      /etc/apache2/sites-enabled/00-dev.chorke.org-le-ssl.conf
ln -s /mnt/d/etc/apache2/chorke/conf.sites.all.d/01-api.chorke.org-le-ssl.conf\
      /etc/apache2/sites-enabled/01-api.chorke.org-le-ssl.conf
ln -s /mnt/d/etc/apache2/chorke/conf.sites.all.d/02-dev.chorke.com-le-ssl.conf\
      /etc/apache2/sites-enabled/02-dev.chorke.com-le-ssl.conf
ln -s /mnt/d/etc/apache2/shahed/conf.sites.all.d/03-dev.shahed.biz-le-ssl.conf\
      /etc/apache2/sites-enabled/03-dev.shahed.biz-le-ssl.conf

Revision as of 19:05, 10 July 2021

Config

config locations:
mkdir -p /mnt/d/usr/share/apache2/icons
mkdir -p /mnt/d/etc/apache2/{chorke,shahed}/conf.sites.all.d
virtual site config:
touch /mnt/d/etc/apache2/chorke/conf.sites.all.d/00-dev.chorke.org{.conf,-le-ssl.conf}
touch /mnt/d/etc/apache2/chorke/conf.sites.all.d/01-api.chorke.org{.conf,-le-ssl.conf}
touch /mnt/d/etc/apache2/chorke/conf.sites.all.d/02-dev.chorke.com{.conf,-le-ssl.conf}
touch /mnt/d/etc/apache2/shahed/conf.sites.all.d/03-dev.shahed.biz{.conf,-le-ssl.conf}
virtual site locations:
mkdir -p /mnt/d/var/www/{chorke,shahed}/{docs,html,soft}
mkdir -p /mnt/d/var/www/{chorke,shahed}/html/.well-known/acme-challenge

Enable

ln -s /mnt/d/etc/apache2/chorke/conf.sites.all.d/00-dev.chorke.org.conf\
      /etc/apache2/sites-enabled/00-dev.chorke.org.conf

ln -s /mnt/d/etc/apache2/chorke/conf.sites.all.d/01-api.chorke.org.conf\
      /etc/apache2/sites-enabled/01-api.chorke.org.conf

ln -s /mnt/d/etc/apache2/chorke/conf.sites.all.d/02-dev.chorke.com.conf\
      /etc/apache2/sites-enabled/02-dev.chorke.com.conf

ln -s /mnt/d/etc/apache2/shahed/conf.sites.all.d/03-dev.shahed.biz.conf\
      /etc/apache2/sites-enabled/03-dev.shahed.biz.conf
ln -s /mnt/d/etc/apache2/chorke/conf.sites.all.d/00-dev.chorke.org-le-ssl.conf\
      /etc/apache2/sites-enabled/00-dev.chorke.org-le-ssl.conf

ln -s /mnt/d/etc/apache2/chorke/conf.sites.all.d/01-api.chorke.org-le-ssl.conf\
      /etc/apache2/sites-enabled/01-api.chorke.org-le-ssl.conf

ln -s /mnt/d/etc/apache2/chorke/conf.sites.all.d/02-dev.chorke.com-le-ssl.conf\
      /etc/apache2/sites-enabled/02-dev.chorke.com-le-ssl.conf

ln -s /mnt/d/etc/apache2/shahed/conf.sites.all.d/03-dev.shahed.biz-le-ssl.conf\
      /etc/apache2/sites-enabled/03-dev.shahed.biz-le-ssl.conf