Cloud CDN for Internal (intranet) Web Site - google-cloud-cdn

I want to use CDN for caching of static assets for an intranet app currently hosted on GCP.
However this site is only available with privately and has no external access. I understand for CDN I need to have external HTTP load balancer and since external load balancers can only be used for external sites with external IPs, I assume I can't really use CDN of any kind? So my best option is to just host it on Google Cloud Storage buckets?

It is possible to create an external load balancer over an instance group who's VMs don't have external IPs, but it would still be exposing the app on an external address.
Buckets might be the way you want to go.

Related

How to host a static website with authentication? [duplicate]

Is it possible to use a custom authentication strategy, and Firebase hosting? Due to the lack of server-side code support with the Hosting plan, it doesn't seem likely, or am I missing something?
Firebase Hosting is a way to serve static assets to web visitors. It cannot run your custom code on Firebase's servers.
So the answer is indeed: no, you cannot use Firebase Hosting to mint custom JWT tokens on the Firebase servers.

Server.Transfer in Asp Net Core 3.1

I have two applications hosted and running in IIS in my windows server.
App A: Dot net core 3.1 application running on 80/443 port handling requests from external clients.
Site B: Hosted on a different port, say 32342, which has sensitive data and serving html pages.
App A is exposed to external network. Site B is behind firewall and not exposed to outside network (Port is blocked by firewall).
Whenever a new request comes to App A, after authentication, it should serve corresponding page from the Site B.
After searching several options, I came up with the option of Server.Transfer(). Unfortunately, it is not supported in Dot net core 3.1
I read about URL Rewrite. But it rewrites all the requests. I just need to serve contents from different server after authentication only for couple of controllers. How do I achieve this inside a Controller.?
(Other better options to serve webpages after authentication is also welcome).

How can I deploy an HTML5 web application in Google Cloud platform?

I am working on an HTML5 web application, which I need to host in Google cloud platform.
How can I deploy the web application, which is based on HTML5/CSS3, jQuery to Google Cloud platform/App Engine?
Clarification:
My web application is build using HTML5/CSS3 with javascript to process data. I am using Visual Studio IDE for development of the same. As per my understanding, apart from the supported languages like java, Python, etc, we can deploy html5 web application to Google cloud platform. How can I package my HTML5 application, which is not using any specific language and deploy to App Engine?
Thanks
Ambily
You can deploy to a bucket directly:
The Website Configuration feature enables you to configure a Google
Cloud Storage bucket to simulate the behavior of a static website. You
can define main pages or directory indices (for example, index.html)
for buckets and "directories". Also, you can define a custom error
page in case a requested resource does not exist.
No programming language at all required :)
Google Cloud Storage
You need a account with Google Cloud Platform to start with. Assuming you have that.
Go to cloud console where you find all the admin menus for creating instances.
You need to create a compute engine instance, if you want to create full fledged website.
Steps to follow:
Create a instance (linux, 10GB disk, 1.7GB memmory) and configure it for all required components.
After this you can move your files to your website folder usually "htdocs"
You will be assigned with an empirical IP address.
Using zone management tools you can add a new domain. All that using the admin panel, no complexity involved.
You may required to configure proxy, if you need access to other machines.

storing images for my website

I want to setup seperate amazon ec2 instance where i store all my images uploaded via my website by users. I want to be able to show images from this exclusive server. I know how to setup DNS names which would point to this server. But i would like to know how to setup the directories, for example if i refer to an image url as http://images.mydomain.com/images/sample.jpg, then
images.mydomain.com is the server name and
images should be the folder name
now the question is should a webserver be running on this server which is what will serve the images or can i just make images folder public so that it is visible to entire world? How do avoid directory listing?
Pointer to any documentation would be greatly appreciated.
It certainly is possible to set up a separate EC2 instances to serve your images. You may have good reasons to do that--for example, you may want to authorize only specific users or groups of users to access certain images, in a way that's closely controlled by program logic.
OTOH, if you're just looking to segment the access of image/media files away from the server that provides HTML/web content, you will get much better performance / scalability by moving those files to a service that is specifically tuned for storage and web access. Amazon's S3 (Simple Storage Service) is one relatively straightforward option. Amazon's CloudFront content distribution network (CDN) or a competing CDN would be an even higher performance option.
Using a CDN for file access does add the complexity of configuring the CDN, but if you're going to the trouble of segmenting media access from your primary web server, and if you're expecting any significant I/O load, I've found it to be a high-return-for-effort-expended approach.
I would definitely not implement this as you are planning. You should store all your images in an Amazon S3 bucket and serve them via Amazon's CloudFront CDN. Why go through the hassle of setting up and maintaining an EC2 instance to do what Amazon has already done? S3 provides infinite storage, manages permissions, metadata, etc. CloudFront provides fast access to your images, caching them at edge locations all around the world. Additionally, you can use Amazon Route 53 (or some other DNS service) to point various CNAMEs to your CloudFront distribution.
If you're interested in this approach I'd be happy to provide more info on how to set this up.
Yes, you will definitly need to run a webserver on the machine. Otherwise it will not bepossible for clients to connect via http/port 80 and view the images in a browser. This has nothing to do with directory listing enabled. Once you have a webserver running, you can disable directory listing in its configuration.
Install an apache on your server and run it (http://httpd.apache.org/docs/2.0/install.html). You then setup what's called a 'site' in its configuration which is pointing to a local directory which will then be the base directory for your server. It could, for example, be /home/apache on a Unix system. There you create your images folder. If your apache is setup correctly you can then access your images via http://images.mydomain.com/images/sample.jpg.

How do I create a subdomain with rackspace?

I have a site I need to create a subdomain for, managed by rackspace cloud.
The domain is already setup and online. I just need to copy the current www.mysite.com to lab.mysite.com.
How do I go about doing this?
Do I add the subdomain in the cloud sites listing, or under the listing for the domain?
And where do I copy the files to? The current site is at /www.mysite.com/web/content on the ftp.
Actually, there is much difference between Rackspace Cloud Sites and Rackspace Cloud Servers, and the ways to manage domains/subdomains are also different.
So, if you have a Cloud Sites account, that should be a part of the control panel.
But if you are on a Cloud Server, it's not the same thing :
Login to your NextGen admin panel choose your server, and open the DNS tab.
Here, you can add a record for your domain sub.domain.com to make it match your server's IP.
Then you'll have to tell Apache there's a new domain to deal with (a virtual host).
As an example, if you are running an Ubuntu Server, that should work something like that.
PS: There's also an official article in the Rackspace Knowledge Center, but i'm not a fan of the proposed solution.
When you login to the control panel at Rackspace, you can add subdomains by creating new sites like you would with a regular site. There's more information in the Cloud Sites Knowledge Base: Creating Sub-domains and/or Domain Aliases