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
I'm learning Lavarel and I have a problem that I don't know how to solve it.
In an internal network I have the machine http://caption-t3/ with a Laravel application. Users access to the laravel application through the URL: https://www.my-domain.com/app/t3/portal.
A reverse proxy redirects all requests from https://www.my-domain.com/app/t3/portal to http://caption-t3/. I don't have access to the reverse proxy configuration
The problem is that the content is obtained but not the css, js and images files. I don't know if it's a problem with the .htaccess file (an apache server is used and I don't know how to configure the .htaccess files) or with Laravel configuration.
Can anyone give me guidance?
Thanks.
As stated in https://www.netlify.com/blog/2015/10/30/domain-aliasesas-many-as-you-like/ Netlify seems to support this:
Our flexible rewrite rules also means you can even handle different
subdomains as folders within the same site.
But how should this be configured? Seems not documented anywhere.
EDIT
I would like to store files in folder /developer and serve them from http://developer.example.com. So for the user it looks he is browsing http://developer.example.com.
You can define redirect rules to do this by defining them in a _redirects file
To serve content hosted on a subdomain to requests coming to the folder URL:
# proxy the request
/my/folder/path https://subdomain.ofmy.site 200
# redirect the request
/my/folder/path https://subdomain.ofmy.site 302
you can also use wildcards and splats
# proxy the request
/my/folder/path/* https://subdomain.ofmy.site/:splat 200
More detailed docs on defining redirects on Netlify: https://www.netlify.com/docs/redirects/
I used this command to startup ngrok for a laravel site, namely testsite.local:
ngrok http -host-header=rewrite testsite.local:80
I have testsite.local defined in /etc/hosts to map to 127.0.0.1
This works, Ngrok starts up just fine and now serves the local site on some random *.ngrok.io address, which I can access. But all URLs within the laravel application (e.g. internal links, or urls for loading a css or js file) are absolute urls to my locally defined domain, like http://testsite.local/news, or http://testsite.local/css/styles.css. In other words, I can load the site fine, but anyone else just sees a bunch of unstyled html and gets a non functional site.
This has to be a general issue for anyone who uses ngrok and has absolute URLs within their project, but google didn't yield anything useful.
Two possible approaches come to my mind:
rewrite all links in the application to be relative instead of
absolute (oh god please no)
any client that wants to access my site via the *.ngrok.io url has to map the 'testsite.local' domain within their very own /etc/hosts file to the ngrok.io url.
The approaches may work, but this seems so far stretched... isn't there anything else one can do?
SOLUTION
https://stackoverflow.com/a/54488972/718980
You need to use Apache Module mod_substitute.
First, enable module:
a2enmod substitute
service apache2 restart
Then, add the following to the .htaccess file:
AddOutputFilterByType SUBSTITUTE text/html
Substitute "s|<your-local-link>|<your-ngrok-link>|in"
More information: https://httpd.apache.org/docs/2.4/mod/mod_substitute.html
In xammp/apache/conf/httd.conf
DocumentRoot "C:/xampp/htdocs/{your-project-path}"
Directory "C:/xampp/htdocs/{your-project-path}"
In the httpd.conf set your DocumentRoot and Directory to the path of your project.
DocumentRoot "C:/xampp/htdocs/projectName"
<Directory "C:/xampp/htdocs/projectName">
I have issue with oil price
which we were getting form below script/ external website link :-
But Due to SSL , we have changed link from below way
which is perfectly working on chrome browser but on other browser script not loading properly
(Have you any idea regarding this how we can resolve )
I am doing this in Wordpress
From an https website you can't include js from an http host. (Active mixed content is blocked)
If you need to include a script, host it yourself (or use a CDN provider with https)
If you need to include a data provider, you need to proxy the request :
https://you.website/get_data.js returns the content of https://the.other.website/get_data.js