How to Set Cache-Control Headers for varnish/cachewall - apache

I little bit confused with my server. Its not returning cache-control headers with varnish and if I try to add cache control headers manually via .htaccess then varnish is not returning appropriate headers for HIT or MISS and Age numbers.
I also do not know how to edit /etc/varnish/default.vcl ?
I am using a VPS and details:
cPanel Version 72.0 (build 10)
Apache Version 2.4.34
PHP Version 5.6.37
Architecture x86_64
What can I do? I have tried other similar solutions and they did not work maybe outdated or i do not understand what to do?

It was happening because of imperfect/imcomplete articles posted on the web.
I found complete installation detail on the github and fixed the issue
https://github.com/apache/incubator-pagespeed-cpanel
Its very difficult for a newbie guy to know the your installation article is incomplete and leave you in the middle to installation.

Related

Apache Mod Filter AH02429

After a fresh install of Apache 2.4.27 on my Unix system I discovered something really odd. My local server giving me 500 error with this error log
AH02429: Response header name 'Content-Length' contains invalid characters, aborting request I tried with all installed browser Chrome, Firefox, Safari problem is same. As I can see my browsers not sending this header, not sure why I am encountering this error. I tried with curl and it's same. Added some tweaks on my httpd.conf file, nothing changed.
I Googled and found that this error comes form apache new module Filter. My apache complied with all modules is there anyway to tell the Filter module to not check for headers or something?
Any kind of help will be life saving.
Thanks in advance

Nginx upload installation error

I am on Mac OSX Lion using Nginx 1.4.1. I am using nginx in conjunction with Tornado.
In the process of installing the Nginx upload module (v. 2.2.0) I encountered some compatibility issues. See this reference for more info. Apparently, there is no great fix for this as of yet. My specific error is rooted in: error: no member
named 'to_write' in 'ngx_http_request_body_t'
Is there a way to make the two of these reliably compatible without jumping through hoops?
Or, is there a suitable alternative to using this upload module that will work with Nginx 1.4.1?
If not, should I considering using Nginx 1.3.8? And if so, where can I download this version? I do not see it available for download on their website here.
Thank you for the help. Regards.
1) No, it doesn't seem like there is as the maintainer of nginx-file-upload has implied he doesn't want to maintain it any more.
2) I found this article which lists some alternatives. One of which is nginx-big-upload I've not tried it yet.
3) Well you could consider it but then you're tied in to a package that isn't maintained. What happens if there's a security vulnerability for 1.3.8? You can't upgrade without either patching or changing your file upload strategy. If you want to, you can find all of the older Nginx versions here
The situation is pretty frustrating at the moment but there are options, just none of them are tried and true. When dealing with production systems stability and security are key.
1) Yes, this module dose not support for nginx 1.4+.
2) The reason is that nginx support chunked of thansfer-encode, and improve its code design. that it remove the field to_write of ngx_http_request_body_t struct.
3) https://github.com/hongzhidao/nginx-upload-module. This is an alter module. It support the latest nginx, and the feature is equal.

Magento-Varnish best VCL configuration

I have installed Varnish accelerator with Apache webserver for Magento installation.
Can any body suggest the best default.vcl (/etc/varnish/default.vcl) configuration for this ?
Any help appreciated.
Thanks.
Obiously you didn't Google this, atleast look for the solution yourself before you come to SO.
When I googled "Magento Varnish" I came up with this first links that is a FREE extension that contains the default.vcl file that you need:
http://www.magentocommerce.com/magento-connect/pagecache-powered-by-varnish.html
If google did still guide you here:
Magento does by now offer a default VCL files within the depths of their GIT repository.
for Varnish 4.x
https://github.com/magento/magento2/blob/2.3/app/code/Magento/PageCache/etc/varnish4.vcl
for Varnish 5.x
https://github.com/magento/magento2/blob/2.3/app/code/Magento/PageCache/etc/varnish5.vcl
for Varnish 6.x
https://github.com/magento/magento2/blob/777b0b0a0950b819991fda239793c91c966254be/app/code/Magento/PageCache/etc/varnish6.vcl

CF10 mod_jk.so won't load with RHEL 5.6 and Apache httpd 2.2.3

Does anyone have a solution to this... Running RHEL 5.6, with Apache httpd 2.2.3-65.el5_8 and get this error when trying to start the webserver:
httpd: Syntax error on line 445 of /etc/httpd/conf/httpd.conf: Syntax error on line 2 of /etc/httpd/conf/mod_jk.conf: Cannot load /data/cf10/config/wsconfig/1/mod_jk.so into server: /data/cf10/config/wsconfig/1/mod_jk.so: undefined symbol: ap_get_server_description
I've looked all over Google, and there are some recommendations to compile my own connector, but I need the one from Adobe for CF10. Also the adobe site lists CF10 compatibility w/ Apache HTTPD 2.2.21, well with RedHat Enterprise they don't move the version number up, it gets reverse patched in the app repo.... ANY help would be awesome.
We are 50 days from going live with CF10 (or planning to), and really could use some help on getting this issue resolved.
In response to one of the posters here, I have indeed verified I'm using the x64 connector in my x64 OS based system.
Response from Adobe w/ SOLUTION!
Here's the response and resolution: You may download the connector from the following “RHEL_mod_jk.zip” web-link at:
http://helpx.adobe.com/coldfusion/kb/rhel-connector-configuration.html
Please note that you may proceed with the installation choosing not to configure the web server initially. Once CF is installed you may proceed to create the connector using the wsconfig tool at
\ColdFusion10\cfusion\runtime\bin
Find the instructions at http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSc3ff6d0ea77859461172e0811cbf364104-7fd9.html
Once the connector is in place you may simply navigate to \ColdFusion10\config\wsconfig\ folder and replace the mod_jk.so file with downloaded copy and restart Apache.
I wanted to add to the discussion my experience with install issues of CF. I've bumped up on two common issues with installing CF, the problems has been so consistent that I wrote a short "how to" blogpost so I wouldn't forget the next time I needed to deploy another server. While my blog post addresses CF 10 and Cent OS 6.4, this method has always worked as far back as I can remember (eg: CF 8)
http://www.greenvalleyconsulting.org/2013/05/16/installation-problem-coldfusion-10-and-centos-6-x/
Response from Adobe w/ SOLUTION!
Here's the response and resolution: You may download the connector from the following “RHEL_mod_jk.zip” web-link at: http://helpx.adobe.com/coldfusion/kb/rhel-connector-configuration.html
Please note that you may proceed with the installation choosing not to configure the web server initially. Once CF is installed you may proceed to create the connector using the wsconfig tool at \ColdFusion10\cfusion\runtime\bin
Find the instructions at http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSc3ff6d0ea77859461172e0811cbf364104-7fd9.html Once the connector is in place you may simply navigate to \ColdFusion10\config\wsconfig\ folder and replace the mod_jk.so file with downloaded copy and restart Apache.

GWT app auto-cache problem

We need to release our GWT app using different URLs for each version, otherwise IE7 (possibly others) seem to cache the old app (leading to grisly bugs). To clarify version/URLs:
http://www.xyz.com/r001/ (version 1)
http://www.xyz.com/r002/ (version 2)
...
Has anybody else seen this? Anybody know how to solve/circumvent in another way? Mayhap there is some Apache setting? Or perhaps some HTTP header? Thanks!
Set the Cache-Control response header to no-cache.
For better control over caching, check out Apache Entity Tags: http://en.wikipedia.org/wiki/HTTP_ETag