Generate CSR
openssl req -new -newkey rsa:2048 -nodes -keyout Domain.key -out Domain.csr
openssl req -new -newkey rsa:2048 -nodes -keyout Domain.key -out Domain.csr
sudo a2enmod ssl
sudo service apache2 restart
sudo apt-get update
sudo apt-get install python3-certbot-apache
sudo certbot –apache -d Domain_name -d www.Domian_name
Add this
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
# ServerAdmin webmaster@localhost
ServerAdmin [email protected]
ServerName your_domain.com
ServerAlias www.your_domain.com
DocumentRoot /var/www/html
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/certificate.crt
SSLCertificateKeyFile /etc/apache2/ssl/private.key
<FilesMatch “\.(cgi|shtml|phtml|php)$”>
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
BrowserMatch “MSIE [2-6]” \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
BrowserMatch “MSIE [17-9]” ssl-unclean-shutdown
</VirtualHost>
</IfModule>
sudo apt install docker.io
sudo apt install docker
sudo systemctl start docker.service
sudo systemctl enable docker.service
docker exec -it container_name/container_name /bin/bash
sudo docker exec -it container_id /bin/bash
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg \
lsb-releasecurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg –dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
“deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable” | sudo tee /etc/apt/sources.list.d/docker.list > /dev/nullsudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo docker run -dit –name linux-guru -p 8080:80 -v /home/user/website/:/usr/local/apache2/htdocs/ httpd:2.4
sudo docker compose pull (Pull Image)
sudo docker compose up -d (Container Up)
sudo docker-compose ps (Container Status)
sudo docker rm container_name (Remove Container)Stop all running containers: docker stop $(docker ps -a -q)
Delete all stopped containers: docker rm $(docker ps -a -q)
Solution :-
Step 1:- Open the terminal and go to the your project Directory path. (like : cd /var/www/html/folder_name/) then run this command in your terminal.
sudo find . -type d -exec chmod 755 {} \;
sudo find . -type f -exec chmod 644 {} \;