Why is my favicon appearing on Amazon S3 endpoint but not on the forwarded domain? - amazon-s3

I have tried everything possible and am out of ideas as to why my favicon is still not appearing. If I told you how much time I've spent trying to figure this out you'd understand why i'm on the verge of losing my mind.
Here's the rundown [i'm not technical- just starting to learn so please bear with me]:
I'm using Amazon S3 as my host. GoDaddy is the DNS and I have forwarding with a mask setup so that the amazon endpoint is directed to the actual domain.
Here's the strange thing-- the favicon appears on the amazon endpoint but doesn't on the forwarded domain which is where I want it to appear. The favicon also appears when I do some testing using Dreamweaver.
I can assure you that it isn't a matter a clearing the cache as I've done that numerous times and have ran tests to make sure that it's working. I've tried all the possible different types of variations of code and nothing works. I'm led to believe that it's not an issue with the code, cache, file but rather something else that is out of my realm of knowledge.
So I come to Stackoverflow.
Please-- any help will be GREATLY appreciated!

For anyone having such problem - making the favicon public and using a direct link found in the file's properties on s3 did the charm.

That means use a full URL that is always going to work from everywhere. Depending on how things are set-up a hostname could resolve to something like localhost on multiple machines, so you want to make sure that the host name you're using always has the resource at that location. CORS should have anything to do with it as it is a standard full GET request.

Related

Yii app on Amazon EC2 how to make it work?

I would like to deploy a Yii app to Amazon EC2.
I've installed httpd, mysql, php and all the necessary modules.
The app was running fine on my wampserver localhost.
I've transferred everything (DB, app folder) but I'm having issues with accessing the site. I see default apache site, and I see directory structure under var/www/html/app folder, and var/www/html/app/web gives a blank page (or Internal Server Error). I have a .htaccess file in var/www/html/app/web. I was searching a lot, and have found informations about allowoverride, virtual hosts (I have only IP, what is server name then? the IP?), etc, and have tried a few different things, but I don't want to mess it completely up, and I'm pretty sure it must be some very simple adjustments to make it work, but I don't know what (maybe some settings with EC2 like elastic IP? I dont yet have that one but I'm not sure I need it). I don't have much experience, can you please point me to the right direction what else I have to set in order to make it work? Thank you very much!
UPDATE: I have set Elastic IP up and registered a domain.
I have simply chosed another image, and without any special actions it works. The first was an Amazon Image, now it's an Ubuntu.

Necessary Apache Redirect to handle absolute svn:external references after a url change

So our Subversion server changed. And with it came a necessary url change, from https://hostname of the previous machine, to a more apt https://svn.
Problem is, a lot of the externals use the absolute https://hostname/blah/blah/blah rather than ^/blah/blah/blah. And this has obviously led to a lot of failures.
To prevent the headache of change possibly hundreds of externals one checkout at a time, I've been asked to figure out a way to utilize http redirects to allow the externals to stay as they are for now.
I've got this simple rule in the httpd.conf of the old server, which is still being used for other http services.
Redirect /repo/ https://svn/repo/
And that works fine for the web browsing of our repositories. But it doesn't work for TortoiseSVN, I just get "Repository moved temporarily to 'https://svn/repo'; please relocate". And on linux I just get "Unable to connect to a repository at URL 'https://old hostname/repo/blah/blah'".
Is this possible at all? I hope it is and I just need a different form of redirect.
Nevermind. I'm too new to this. I had to change 'Redirect' to 'Redirect 301'.
Probably should have been obvious. But it works now.

How to create a friendly url in Tomcat?

I want to modify my application URL from //localhost:8080/monitor/index.html to just monitor , so that on putting monitor on browser, my application should open. Is there a way to achieve this, can someone suggest the configuration changes which will be required for this.
Can I map my short URL to the existing one may be somewhere in web.xml. I am not sure about the approach any suggestions will be great.
Thanks and regards
Deb
You're mixing up several different protocol layers in your question.
If you just enter nothing but "monitor" in the browser URL bar the browser is going to first lookup "monitor" in DNS and finding nothing it will then probably send a query to Google or your configured search engine. In the past browsers have taken other steps, such as appending ".com" and prepending "www." but I don't think modern browsers do that any more.
So far, your server is not even remotely involved.
If you're a large ISP user (TimeWarner, Comcast) and use their DNS it's also possible the ISP will intercept your failed DNS lookup and route the request to a "helpful" search page (i.e. SPAM) of their own.
At this point the request is still nowhere near your server.
I suppose you could mess with the /etc/hosts file on your local system to resolve "monitor" to the proper hostname, but that's an extremely brittle solution that has to be hard coded on each machine you want to have this "shortcut" link (and which breaks when the hostname changes).
You're much better off just setting up a web shortcut in your browser that points to the right place.

aws s3 intergration with mediawiki

I working with mediawiki.
I want to change upload directory path to aws s3, i tried these two extensions but i getting some warning message.
I dont know these extension are working correctly.
https://www.mediawiki.org/wiki/Extension:LocalS3Repo and
https://www.mediawiki.org/wiki/Extension:AWS
If anybody is working with these extension or if you achieved these in any other ways
please explain me
I have been succesfully using the method described here, though in step 6, rather than using an apache rewrite, I changed the image paths in LocalSettings.php.
(It was quite a lot of work though, and I never figured out a way to the the cache-control and expires headers on the files, which was the real reason why I wanted to do it to begin with.)

Can we detect if a site is on CDN?

Is there a way to detect if a site is on a Content Delivery Network and if yes, can we tell which service are they using?
A method that is achievable from the command line is using the 'host' command, with the -a flag set to see the DNS record e.g.
host -a www.visitbritain.com
Returns:
www.visitbritain.com. 0 IN CNAME d18sjq5nyxcof4.cloudfront.net.
Here you can see that the CNAME entry tells us that the site is using cloudfront as the CDN.
Just take a look at the urls of the images (and other media) of the site.
Reverse lookup IP's of the hostnames you see there and you will see who own them.
I built this little tool to identify the CDN used by a site or a domain, feel free to try it.
The URL: http://www.whatsmycdn.com/
You might also be able to tell from the HTTP headers of the media if the URL doesn't give it away. For example, media served by SimpleCDN has Server: SimpleCDN 5.6a4 in its headers.
cdn planet now have their cdn finder tool on github
http://www.cdnplanet.com/blog/better-cdn-finder/ The tool installs on the command line and allows you the feed in host names and check if they use a CDN.
If Website using GCP CDN you simply check it using curl
curl -I <https://site url>
In reponse you can find following headers there available
x-goog-metageneration: 2
x-goog-stored-content-encoding: identity
x-goog-stored-content-length: 17393
x-goog-meta-object-id: 11602
x-goog-meta-source-id: 013dea516b21eedfd422a05b96e2c3e4
x-goog-meta-file-hash: cf3690283997e18819b224c6c094f26c
Yes you can find by
host -a www.website.com
Apart from some excellent answers already posted here which include some direct methods which may or may not work for all the websites out there, there is also an indirect way to see if a CDN is there. And especially if its your own website and you want to know if you are getting what you are paying for !
The promise of a CDN is that connections from your users are terminated closer to them so that they get less TCP / TLS connection establishment overhead and static content is cached closet to them so that it loads faster, puts less strain on your origin servers.
To verify this, you can take measurements of site load times across the globe and see if all the users get similar loads times. No you dont have to get a machine everywhere in the world to do that ! Someone has already done that for you
Head to https://prober.tech/ and the URL you wish to test for load times.
Because this site itself is in Cloudflare's CDN, you can put that link itself in the test box and use it as baseline !
More information on using the tool can be found here