$ -weight: 600;">sudo mkdir -p /var/www/html/api
-weight: 600;">sudo chown -R www-data:www-data /var/www/html/api
-weight: 600;">sudo chmod -R 755 /var/www/html/api
-weight: 600;">sudo mkdir -p /var/www/html/api
-weight: 600;">sudo chown -R www-data:www-data /var/www/html/api
-weight: 600;">sudo chmod -R 755 /var/www/html/api
-weight: 600;">sudo mkdir -p /var/www/html/api
-weight: 600;">sudo chown -R www-data:www-data /var/www/html/api
-weight: 600;">sudo chmod -R 755 /var/www/html/api
echo "<?php phpinfo(); ?>" | -weight: 600;">sudo tee /var/www/html/api/index.php
echo "<?php phpinfo(); ?>" | -weight: 600;">sudo tee /var/www/html/api/index.php
echo "<?php phpinfo(); ?>" | -weight: 600;">sudo tee /var/www/html/api/index.php
-weight: 600;">sudo nano /etc/apache2/sites-available/api-your-domainname-com.conf
-weight: 600;">sudo nano /etc/apache2/sites-available/api-your-domainname-com.conf
-weight: 600;">sudo nano /etc/apache2/sites-available/api-your-domainname-com.conf
<VirtualHost *:80> ServerName api-your-domainname.com DocumentRoot /var/www/html/api <Directory /var/www/html/api> Options FollowSymLinks AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/api_error.log CustomLog ${APACHE_LOG_DIR}/api_access.log combined
</VirtualHost>
<VirtualHost *:80> ServerName api-your-domainname.com DocumentRoot /var/www/html/api <Directory /var/www/html/api> Options FollowSymLinks AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/api_error.log CustomLog ${APACHE_LOG_DIR}/api_access.log combined
</VirtualHost>
<VirtualHost *:80> ServerName api-your-domainname.com DocumentRoot /var/www/html/api <Directory /var/www/html/api> Options FollowSymLinks AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/api_error.log CustomLog ${APACHE_LOG_DIR}/api_access.log combined
</VirtualHost>
-weight: 600;">sudo a2ensite api-your-domainname-com.conf
-weight: 600;">sudo -weight: 500;">systemctl reload apache2
-weight: 600;">sudo a2ensite api-your-domainname-com.conf
-weight: 600;">sudo -weight: 500;">systemctl reload apache2
-weight: 600;">sudo a2ensite api-your-domainname-com.conf
-weight: 600;">sudo -weight: 500;">systemctl reload apache2
-weight: 600;">sudo a2dissite 000-default.conf
-weight: 600;">sudo -weight: 500;">systemctl reload apache2
-weight: 600;">sudo a2dissite 000-default.conf
-weight: 600;">sudo -weight: 500;">systemctl reload apache2
-weight: 600;">sudo a2dissite 000-default.conf
-weight: 600;">sudo -weight: 500;">systemctl reload apache2
http://api-your-domainname-com
http://api-your-domainname-com
http://api-your-domainname-com
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install certbot python3-certbot-apache -y
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install certbot python3-certbot-apache -y
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install certbot python3-certbot-apache -y
-weight: 600;">sudo certbot --apache -d api-your-domainname-com
-weight: 600;">sudo certbot --apache -d api-your-domainname-com
-weight: 600;">sudo certbot --apache -d api-your-domainname-com - Ubuntu VM with -weight: 600;">sudo access
- Apache2 installed (-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install apache2 -y)
- Domain names pointing to your server’s public IP (configured via DNS) - Its own directory under /var/www/html/
- Its own config file under /etc/apache2/sites-available/
- Its own SSL certificate (or a shared multi‑domain certificate) - Joined Jul 16, 2024