![]() For your current use case, I recommend Qwiklabs Network & HTTP LBs lab. If you're new to GCP or cloud computing in general, I recommend doing some Qwiklabs hands-on courses to build up your foundational knowledge. If you ever need to update the content, you can either use the 2 options I mentioned above - or better yet, update your instance template and do a rolling update on the backend VMs, replacing each VM created from an old template with one creating from a new template. There's actually a 3rd option that I neglected to mention, but that is to update your Bitnami server with your webpage content BEFORE creating an instance template - this way, the instance will already come with the content preloaded. The 2 options I previously mentioned are common methods of getting access to your env or updating its content without exposing yourself too much. Security shouldn't be convenient but you should really still side with security. And of course removing the public IPs to the individual VMs poses other problems from a management/update point of view. As a result, you won't need (and shouldn't have) public IPs for each individual VM because now you just have extra avenues for attackers enter your environment with. Hence the LB, so you have 1 public IP that will forward traffic to your backend whether you have 1 or 100. In practice - and it's what you're experiencing now, your backend will need to be able to scale and in order to do that more autonomously, you will need to use instance templates, but as you have seen, you can't create instance templates off of VMs that already have a public IP and it wouldn't make sense anyway as each VM's content would only be accessible by its public IP. This would be the more secure option, but if you're just serving content from a single server or using it as a test, one might argue that you don't need an LB (I mean, why pay for an LB if load just goes to a single server anyway, right?) You could have also created it without a public IP and created an LB that points to it. ![]() A public IP is provided to the server and that's how you and others would access the server (whether it's SSH or HTTP). Now check your server IP in your favorite browser (chrome probably?), and your project should run there.Ok, so the Bitnami server that you create following the instructions that you did is suitable for a lone server setup/test environment.Restart apache with this command sudo /opt/bitnami/ctlscript.sh restart apache.Include "/opt/bitnami/apache2/conf/bitnami/nf" # Bitnami applications that uses virtual host configuration SSLCertificateKeyFile "/opt/bitnami/apache2/conf/server.key" SSLCertificateFile "/opt/bitnami/apache2/conf/server.crt" SSLSessionCache "shmcb:/opt/bitnami/apache2/logs/ssl_scache(512000)"ĭocumentRoot "/opt/bitnami/apache2/htdocs" SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS !EDH !RC4" # Default SSL Virtual Host configuration. ProxyPass / ProxyPassReverse / ProxyPreserveHost On # Include "/opt/bitnami/apache2/conf/bitnami/nf" # Bitnami applications installed with a prefix URL (default) # DocumentRoot "/opt/bitnami/apache2/htdocs" Edit the file opt/bitnami/apache2/conf/bitnami/nf and replace the content with the configuration below (it’s only a proxy pass to route your server to the 3000 port).Launch your own project on port 3000 (using your favorite grunt/node server command) and test if works ? If it’s OK, go to step 5.Open up port 3000 in your Google Compute Network Firewall : Your VMs > Edit > Network > Click on default.Clone the project under /home/user/apps/.Launch your server SSH console from Google Cloud Platform (Bitnami).Images are delivered with all the tools you need to work efficiently! For example, the MEAN stack came with MongoDB, NodeJS, Express, Git, etc.īut, a little configuration is needed to make your app listening on your custom port (3000 for example) Steps GCP proposes a lot of pre-configured images for all your needs: blog, os, database, crm, or developer tools and infra like: I believe in Google products, so it’s thus quite naturally that I use Google Cloud Platform to host my websites, apps, etc.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |