How to implement Cloudfront caching with webinoly wordpress - caching

I had already used webinoly wordpress with cloudfront CDN and caching was working very fine and I use these commands to reset the cache control header.
Here is the command
sudo webinoly -header-cache-control=reset
sudo webinoly -header-cache-control=on
s-max-age=600
But now these commands are not working.
So now please tell me how can I do this.
Now cloudfront is not Hitting the cache only fastcgi is working

Related

Prestashop admin login error 302, CloudFlare and LiteSpeed server

We have migrated a PrestaShop(PS) v.1.7.8.7 from an Apache server to a LiteSpeed server which includes the LiteSpeed cache module for PS and crawler enabled.
CloudFlare(CF) has always been in play with both the existing and the new server.
But when we enable "proxied" in DNS settings for the new server - then we suddenly can't login at the admin URL due to a 302 error. It looks like the login page is called 2 times in a row. All other functionality on the site works flawless.
Screenshots of the main-domain which is "proxied" via CF:
When we disable "proxied" in CF then we can login via the PS Admin page again as seen in the screenshot below:
Screenshot of the test-domain which is not "proxied" via CF:
The page just redirects to itself again and doesn't complain about wrong user credentials or similar.
We believe it's due to Litespeed's re-write logic. We have tried to disable the LiteSpeed cache module again (the LiteSpeed's rewrite rules are of course still unchanged even though the cache module has been disabled in PS) - and the issue remains. Somehow there is a conflict between CF and LiteSpeed in this setup which causes the redirect error. We know that WordPress has a CF module which enables CF and LiteSpeed's cache module to work simultaneously.

Changes are not applied to the blade page after the deployment

There is an AWS EC2 instance on which the laravel application is deployed. Cloudflare is also connected to it. I pushed the simplest change for the blade page, which changes the color of the title, but the page has not changed in any way and looks the same.
I am sure that the changes got to the server, connected via ssh and manually looked at the blade file.
I've tried the artisan commands cache:clear, view:clear, config:clear. I manually cleaned the storage/framework/views and bootstrap/cache/ folders.
I was deleting the cloudflare cache and switched to developer mode.
None of this helped.
What other cache cleanup options did I miss?
The problem was in CloudFlare Rocket Loader. Everything worked after I turned it off.

Axios Vue.js throwing Cors error on Heroku Laravel application

I've got a Laravel app that's hosted on Heroku, currently in staging environment that's password protected. It's accessible via https:// but axios is making requests to http:// and causing a cors error... I've tried adding allow origin headers as middleware on the routes but that doesn't fix the error.
Is there a way to force axios to use https by default? I don't want to pass the full URL to the axios.get()
This doesn't happen on local so could it be something caused by Heroku?
There is a Pull Request on the way that will try to access http/s if the other protocol fails. So it's a matter of time now.
I think the issue is actually related to Heroku but I can't be certain.
The only thing that tells me this is that I moved to an EC2 instance via Laravel Forge and I don't have any problems.
Strangely I also had a couple of files that were being requested without www. And when viewing in browser it forced the css files to the naked domain. What's weird though is other css files loaded with www. And weren't redirected so I think it could also have been a permissions thing.
I solved the file issue by simply changing the file name and the redirect stopped so maybe an overzealous redirect. Either way it was annoying and I think I tried everything so hopefully that information helps somebody else in future.
Cheers

Using HTTPS with URIs on Mediawiki

I have a MediaWiki install running on a Ubuntu 12.04 server using Nginx as the webserver. I have also created a self signed certificate to use with the site so that when I log in, my passwords would not be exposed to everyone on the internet.
Recently, I noticed the the site does not properly load the CSS for the site. Upon closer inspection it appears that my browser (firefox) is blocking certain content because it is apparently insecure. It seems to not like that the images on the site are being referenced by uri instead of using https:// but I am not sure how to correct this. Has anyone run into this before?
You should try using protocol-relative URIs for $wgServer in your LocalSettings.php. For example, it looks like you have:
$wgServer = "http://wiki.asedmunds.ca";
Try
$wgServer = "//wiki.asedmunds.ca";
instead.

The whole UI gone from the website

I'm working on this website. Because the client changed some settings the 'index.php' was gone from website and I corrected. From then the whole UI of the website is gone. I tried to do something from the backend and the was wondered to see the backend also gone. It just redirects to the from end once I log-in for back. Are there any solutions for this. Please suggest. I'm in very much need of it.
Go to admin->system->configuration-> General->Web-> for both Unsecure and secure ->'Base URL' should not end with index.php
Flush the cache after changing the settings.
A fewdays back when I was working in my localmachine I faced the same problem. I'm not sure why the UI has gone, But the solution worked for me is:
In server cmd prompt, I have stopped the IP tables by command -- service iptables stop and by disabling selinux by command -- setenforce 0 ... After giving these two commands, clearing the cache , the site came normal. But these cannot be implemented on online servers. Just try with these. If it works then can come to conclusion, that server is fine.

Resources