<VirtualHost *:80> ServerName mydomain.co.in ServerAlias mydomain.co.in ServerAdmin info@mydomain.co.in DocumentRoot /home/info/mydomain <Directory "/home/info/mydomain"> Order allow,deny Allow from all Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> <VirtualHost *:443> ServerName mydomain.co.in ServerAlias mydomain.co.in ServerAdmin info@mydomain.co.in DocumentRoot /home/info/mydomain <Directory "/home/info/mydomain"> Order allow,deny Allow from all AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
But somehow the site is working with https - I didn't do anything related to pem/cert files, certbots etc etc. I haven't yet got the skillset to setup SSL certificates and this is a brand new server to which only I have access.
Yes, https is loading normally without even showing a warning. How is this possible ?
Solved! Go to Solution.
Hi @anjanesh,
You can manage your own SSL certificates or use Google-managed SSL Certificates to serve your website over HTTPS.
If you prefer to install certificates via the console, you can follow the instructions in this Medium guide. This method utilizes Let's Encrypt. Let's Encrypt provides people and organizations around the world to obtain, renew, and manage SSL/TLS certificates. Their certificates can be used by websites to enable secure HTTPS connections [1].
Alternatively, if you wish to set up HTTPS using Google-managed SSL Certificates, you may refer to this YouTube video for an in-depth discussion on setting up with a load balancer. (Note: Setting up HTTPS through a load balancer will incur additional costs.)
Let me know if you have more questions. Thanks! 😃
[1]. https://letsencrypt.org/docs/faq/#what-services-does-let-s-encrypt-offer
Hi @anjanesh,
Welcome to the Google Cloud Community!
Can you try removing the config block:
<VirtualHost *:443> ServerName mydomain.co.in ServerAlias mydomain.co.in ServerAdmin info@mydomain.co.in DocumentRoot /home/info/mydomain <Directory "/home/info/mydomain"> Order allow,deny Allow from all AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
After you delete the config block, kindly restart your web server. Your server should no longer listen on port 443.
Alternatively, if this is not your expected configuration. Can you try browsing your website through Incognito or from another browser?
Were you also able to test this outside of Compute Engine like your own VM or other provider?
Let me know if it helped. Thanks.
Actually I want my site to be served by https. Do I need to install certs via the console ? Or is there some mechanism where Google will do it automatically ?
Hi @anjanesh,
You can manage your own SSL certificates or use Google-managed SSL Certificates to serve your website over HTTPS.
If you prefer to install certificates via the console, you can follow the instructions in this Medium guide. This method utilizes Let's Encrypt. Let's Encrypt provides people and organizations around the world to obtain, renew, and manage SSL/TLS certificates. Their certificates can be used by websites to enable secure HTTPS connections [1].
Alternatively, if you wish to set up HTTPS using Google-managed SSL Certificates, you may refer to this YouTube video for an in-depth discussion on setting up with a load balancer. (Note: Setting up HTTPS through a load balancer will incur additional costs.)
Let me know if you have more questions. Thanks! 😃
[1]. https://letsencrypt.org/docs/faq/#what-services-does-let-s-encrypt-offer