To connect your Website domain name to a Cloud VPS hosting environment running XAMPP, follow these steps:
-
Obtain Your VPS IP Address:
- Log in to your Contabo account and navigate to your VPS management section to find your server's public IP address.
-
Configure Your Domain's DNS Settings:
- Access your domain registrar's control panel.
- Locate the DNS management section.
- Create an 'A' record pointing your domain (e.g.,
yourdomain.com
) to your VPS's public IP address. - If you want 'www.yourdomain.com' to also point to your VPS, add a 'CNAME' record for 'www' pointing to 'yourdomain.com'.
-
Set Up Virtual Hosts in XAMPP:
- On your VPS, open the
httpd-vhosts.conf
file located atC:\xampp\apache\conf\extra\httpd-vhosts.conf
. - Add the following configuration, replacing placeholders with your actual domain and directory paths:
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "C:/xampp/htdocs/yourdomain" ServerName yourdomain.com ErrorLog "logs/yourdomain.com-error.log" CustomLog "logs/yourdomain.com-access.log" common </VirtualHost>
- Ensure the
DocumentRoot
points to the directory containing your website files.
- On your VPS, open the
-
Restart Apache:
- After saving the changes, restart Apache using the XAMPP Control Panel to apply the new configuration.
-
Verify the Setup:
- Allow some time for DNS propagation (this can take up to 48 hours, but often less).
- Access your domain in a web browser to ensure it correctly displays your website hosted on the VPS.
Click Here f or a visual walkthrough of this process, you can refer to the following video.
Comments
Post a Comment