Advertisement
independentt

How to install a website with SSL mollyeskam.net Included

Jun 25th, 2020 (edited)
13,068
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.25 KB | None | 0 0
  1. #!/bin/bash
  2. # How to host a website with SSL
  3. ## Including a template of the Official site of Playboy Model Molly Eskam - https://www.mollyeskam.net
  4. ## (Made by me)
  5. # Follow Molly Eskam Here:
  6. ## https://www.instagram.com/mollyeskam/
  7. # Her YouTube Channel:
  8. ## https://www.youtube.com/user/mollyeskam
  9. ## An Apache2 installation on Debian is preferred.
  10. # HOW TO INSTALL (Pretty simple)
  11. ## git clone https://github.com/independentcod/mollyweb.git && sh mollyweb/bootstrap.sh
  12. ### I made this repository only because of that if I die someday someone can take this website and re-host it.
  13. ### Everything I do I do it for Molly Eskam and the community.
  14.  
  15. echo ***Install required files***;
  16. if [ -f "/usr/bin/yum" ]; then
  17.     sudo yum install epel-release unzip alien mod_ssl httpd php nmap whois -y
  18. fi
  19. if [ -f "/usr/bin/apt" ]; then
  20.    sudo apt update && sudo apt install unzip apache2 php nmap whois -y
  21. fi
  22. echo ***Make Apache directories***;
  23. sudo mkdir /var/www;
  24. sudo mkdir /var/www/html;
  25. sudo mkdir /etc/apache2/logs/;
  26. echo ***Get main website***;
  27. sudo wget -O mollywebsite.tar.gz https://archive.org/download/mollywebsite.tar_update/mollywebsite.tar.gz;
  28. echo ***decompress***;
  29. sudo tar xvf mollywebsite.tar.gz -C /var/www/html/;
  30. echo ***make a temporary directory***;
  31. sudo mkdir /root/mollywebsite;
  32. echo ***change directory***;
  33. cd mollywebsite;
  34. echo ***make directory for the lounge live chat plugin***;
  35. sudo mkdir /etc/thelounge;
  36. if [ -f "/usr/bin/yum" ]; then
  37.     echo ***convert thelounge .deb to .rpm for CentOS***;
  38.     sudo alien -r /var/www/html/thelounge_4.1.0_all.deb
  39.     echo ***install thelounge .rpm***;
  40.     sudo rpm -i /var/www/html/thelounge_4.1.0_all.noarch.rpm
  41. fi
  42. if [ -f "/usr/bin/apt" ]; then
  43.     echo ***install thelounge for Debian***;
  44.     sudo apt install nodejs -y;
  45.     sudo dpkg -i /var/www/html/thelounge_4.1.0_all.deb
  46.     echo ***resolving thelounge dependencies.***;
  47.     sudo apt -f install -y;
  48. fi
  49. echo ***move necesary files from temp thelounge directory to program directory***;
  50. sudo cp -r /var/www/html/thelounge/* /etc/thelounge/;
  51. echo ***move the config file into the correct OS directory***;
  52. if [ -f "/usr/bin/yum" ]; then
  53. sudo cp -r /var/www/html/httpd.conf /etc/httpd/conf/;
  54. fi
  55. if [ -f "/usr/bin/apt" ]; then
  56. sudo cp -r /var/www/html/apache2.conf /etc/apache2/apache2.conf;
  57. fi
  58. echo ***Give permissions***;
  59. sudo chmod +rwx /etc/thelounge -R;
  60. sudo chmod +rwx /var/www/html -R;
  61. echo ***Activate SSL***;
  62. a2enmod ssl;
  63. cd /etc/apache2;
  64. echo ***Get some config files needed***;
  65. sudo wget -O sites-enabled/000-default.conf https://archive.org/download/mollywebsite.tar/000-default.conf;
  66. sudo wget -O conf-enabled/other-vhosts-access-log.conf https://archive.org/download/mollywebsite.tar/other-vhosts-access-log.conf;
  67. echo ***Make certificates directories***;
  68. sudo mkdir /etc/letsencrypt/
  69. sudo mkdir /etc/letsencrypt/live;
  70. sudo mkdir /etc/letsencrypt/live/www.mollyeskam.net;
  71. echo ***Get the certificates***;
  72. sudo wget -O /root/mollywebsite/cert.zip https://archive.org/download/mollywebsite.tar/cert.zip;
  73. echo ***Decompress certs***;
  74. cd /etc/letsencrypt/live/www.mollyeskam.net;
  75. sudo unzip /root/mollywebsite/cert.zip;
  76. sudo systemctl enable apache2;
  77. echo "Setup complete, to start webserver type sudo apache2 && sudo thelounge start&";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement