Language Selection

English French German Italian Portuguese Spanish

New Content/Layout OK?

Varnish Proxy

Silly me, a poll would not work on the new server. I forgot that with the Varnish cache proxy at the front almost all visitors arrive from the same IP address (the proxy), which means that Drupal would allocate just one vote to all (except registered and presently logged in users). With Drupal upgrade we can perhaps find polling software that overcomes this.

rpaf

You must use mod_rpaf to fix this problem that Varnish introduces.
See eg https://www.varnish-cache.org/lists/pipermail/varnish-misc/2008-September/016470.html
mod_rpaf for EL6 64bit here: http://centos.alt.ru/repository/centos/6/x86_64/mod_rpaf-0.6-2.el6.x86_64.rpm

Proxy

Thank, we will look into it. Currently, a lot of stuff other than the poll (e.g. views being counted) are not compatible with Varnish and it makes it look as though not many people visit and can participate in the site.

For sheer stats you could use

For sheer stats you could use an external (i.e. not cached by varnish) service, such as Google Analytics or run your own Piwik.

Piwik

Google Analytics is spyware, but Piwik would be a possibility (Stallman recently told me that it's good). Can it be installed on a cache proxy? I'd have to gain access to it first. Either way, this would not facilitate per-post page request count. Susan had it set up with a module, but it's no longer working correctly. In turn, rating/sorting posts by popularity is no longer possible, and that's the real downside (the front page can no longer list popular items for today).

The problem is not just that IP addresses are not unique. Some requests are never seen by the CMS and Apache.

For the non-unique addresses

For the non-unique addresses look at mod_rpaf, it was made for this situations.
Is this drupal6 or 7? With 6 varnish integration sucks from what I've seen.

See also
https://drupal.org/project/varnish
https://fourkitchens.atlassian.net/wiki/display/TECH/Configure+Varnish+3+for+Drupal+7

Agreed on Google Analytics. You can just install Piwik on the same host and tell Varnish either not to cache it or you can just set its virtualhost on a port other than 80 so it bypasses Varnish completely.

Varnish

Thanks for the pointers.

Yes, it's Drupal 6 and there are other issues that I am beginning to see, such as lack of updates from the RSS feeds around the page (I am currently investigating this, maybe it's related to a cron job or module config although I very much doubt the latter as I haven't changed configs).

Non-unique addresses could be bypassed as an issue even by writing random IP addresses, but that would enable easy poll rigging. I guess it's not essential for operation of the site, but it's a nice-to-have...

From Drupal.org: "This module provides integration between your Drupal site and the Varnish HTTP Accelerator, an advanced and very fast reverse-proxy system. Basically, Varnish handles serving static files and anonymous page-views for your site much faster and at higher volumes than Apache, in the neighborhood of 3000 requests per second."

I have had such issues with Varnish on top of WordPress and MediaWiki (pages served improperly from cache) and it all makes me wonder if removing Varnish altogether is the best way to proceed.

As for Piwik, I have never tried it before, so I will look into it.

I would keep Varnish on for

I would keep Varnish on for static files (css, js, jpeg etc) and to clean up HTTP traffic (Varnish will not forward incomplete or malformed HTTP requests to the backend, it should also be the front line against synfloods etc).

Here's a sample of what I use (test it first, I'm just beginning with Varnish myself)

director default dns {
.list = {
.port = "8080";
.connect_timeout = 5s;
.first_byte_timeout = 600s;
.between_bytes_timeout = 600s;
.max_connections = 10000;
"172.16.1.53"/32;
}
}
sub vcl_recv {
if (req.url ~ "\.(png|gif|jpg|swf|css|js)$") {
return(lookup);
}
}
sub vcl_fetch {
if (req.url ~ "\.(png|gif|jpg|swf|css|js)$") {
unset beresp.http.set-cookie;
}
if (req.restarts == 0) {
if (req.http.x-forwarded-for) {
set req.http.X-Forwarded-For =
req.http.X-Forwarded-For + ", " + client.ip;
} else {
set req.http.X-Forwarded-For = client.ip;
}
}
}

Then install mod_rpaf and make sure your Apache is listening on port 8080 and add this to /etc/httpd/conf.d/rpaf.conf:
LoadModule rpaf_module modules/mod_rpaf-2.0.so

RPAFenable On
RPAFproxy_ips 127.0.0.1 IPs_OF_THE_SERVER
RPAFsethostname On
RPAFheader X-Forwarded-For

PS: looks like drupal is messing with my comments, here's a text version http://fpaste.org/74672/raw/

Thanks

Thanks, I will look at it and into it in the weekend.

RSS feeds

The Piwik demo looks impressive, I have just given them a word of endorsement.

I am still trying to resolve some other issues we've identified.

I think I found the source of the issue above (RSS feeds). It seems like any external site access is denied by default, which helps explain why RSS feeds cannot be retrieved by the Drupal part of the site:


[root@tuxmachines ~]# wget lxer.com
--2014-02-05 04:34:37--  http://lxer.com/
Resolving lxer.com... 108.166.170.174
Connecting to lxer.com|108.166.170.174|:80... failed: Connection refused.
[root@tuxmachines ~]# wget linuxtoday.com
--2014-02-05 04:34:54--  http://linuxtoday.com/
Resolving linuxtoday.com... 70.42.23.121
Connecting to linuxtoday.com|70.42.23.121|:80... failed: Connection refused.

Looks like a firewall issue

Looks like a firewall issue at the first glance.

Firewall

Nux wrote:

Looks like a firewall issue at the first glance.

Yes, it was a simply issue to tackle. It works now.

Pageview count and polls

I'll have a look and see if configuration can solve not just the polling issue but also pageview count. The site of this module is down and it seems like it may require configuration on the cache server too.

More in Tux Machines

today's howtos

  • What option to use for ping constantly until you stop it? - Linux Shout

    The Ping program is a widely used tool to check the accessibility of a computer network. All operating systems available till now have the ability to run the Ping command with various options to even continuously check the network resource or connection availability. However, if a firewall suppresses ping packets on the way from your computer to the host, it can falsely appear to be unreachable. To do this, it sends echo request packets to the host via ICMP. Using the time difference between this and the response (echo reply), it calculates the runtime. Ping was defined in RFC 1574.

  • How to Cast Media from Ubuntu to Chromecast | FOSS Linux

    In this Ubuntu tutorial, we shall see ways to cast media from a Linux PC to a Chromecast device. We shall see command-line and GUI ways of casting the content.

  • How do I view Nginx logs? – Linux Hint

    Logs are very important in a system to monitor the activities of an application as they provide you with useful debugging information and enable you to analyze all aspects of a web server. Like the other software applications, Nginx also maintains events like your web site visitors, encountered problems, and more to log files. The useful recorded information is used to take preemptive measures in order to deal with major serious discrepancies in the log events. In this article, we will elaborate on how to configure and view Nginx Logs in Ubuntu 20.04 system to monitor the application activities. There are two types of logs where recorded events in Nginx one is the access log, and the other is the error log. If you have already enabled these logs in the Nginx core configuration file then, you can find both types of logs in /var/log/nginx in all Linux distributions.

  • How To Install PowerShell on CentOS 8 [Ed: Microsoft is just trying to turn GNU/Linux into its own thing, intended to serve Microsoft's bottom line and lock-in]
  • OSINT Tools and Techniques – Linux Hint

    OSINT, or Open Source Intelligence, is the act of gathering data from distributed and freely accessible sources. OSINT tools are used to gather and correspond data from the Web. Data is accessible in different structures, including text design, documents, images, etc. The analysis and collection of information from the Internet or other publicly available sources is known as OSINT or Open Source Intelligence. This is a technique used by intelligence and security companies to gather information. This article provides a look at some of the most useful OSINT tools and techniques.

  • How to Record Your Gnome Desktop in Ubuntu with built-in screen recorder – Linux Hint

    In the present era, the lives of the people have undergone a huge change from what it used to be a couple of years back. In the educational sector, books have fallen down the pecking order, and people now prefer watching videos explaining the concepts of their syllabus. A great example of this is YouTube, where videos on things like programming languages, economics, political science, and even geography are getting many viewers. The business sector has also gone through some innovation as now people can easily keep a record of important voice calls and conferences that might be needed for looking at the main highlights of the meeting. Even recording presentations and then sharing them with your clients or bosses have become the norm as this allows information to be passed from one to another in a much more efficient manner. All of these are just a few examples of why screen recorders are one of the most useful tools out there. Screen recorders can even be used for recording content that many people may find enjoyable, such as recording a game that might be on the rise in popularity or put up videos to explain any issues or problems that you might come across in your life, like checking to see how one can remove and adjust tires from a car. Hence, our discussion topic in this article is to look at how one can record their screens in Ubuntu using its default built-in screen recorder.

  • Blender Animation Nodes – Linux Hint

    Blender animation nodes is a visual scripting system made for motion graphics in Blender. Animation nodes are an addon that is available for macOS, Linux, and Windows. There are a lot of things which you just can imagine to animate by hand because it is a very difficult task. Animation Nodes allows us to make complex animation in a less complex and tedious way. Animation Nodes add-ons can save you a lot of time and has several advantages over traditional keyframing technique. For instance, you can avoid managing many keyframes, and each node tree can be used for any objects; you don’t have to keyframe them every time.

  • Blender Animation Loops – Linux Hint

    Blender is a powerful 3D creation tool. Blender holds all the attributes that a 3D artist needs. Sometimes a short movie tells a lot than an image. Making 3D scenes in Blender is great, but animating it is another level of mastering this program. So, it is essential to know about adding motion to 3D objects. Animation is an excellent way to connect and communicate with people; that’s why it is vital in the business world. Conveying a message through animation is considerably more appealing than images. Whether it is education or businesses, the film industry, or gaming, animation is being used everywhere.

Best Photo Editors for Linux

This article will cover a list of free and open-source image editors available for Linux. These applications feature basic tools for simple editing needs as well as advanced utilities for professional artists. GIMP If you are a regular Linux user, chances are that you must have heard about GIMP (GNU Image Manipulation Program) or used it to edit images. It is considered to be one of the most comprehensive, free, and open source image editing software available not only on Linux, but also on other operating systems like Windows and macOS. While some users may prefer proprietary tools like Photoshop over it, GIMP itself is packed with tons of features and can do almost everything that Photoshop is capable of. You can see all major features of GIMP available at here and here. GIMP can be extended using plugins, some of them come with the official installation while others can be downloaded from third party websites. [...] RawTherapee RawTherapee is an open source image editing software specially designed for processing and handling “raw” images. You can also import and edit image files having other formats. RawTherapee features various utilities for processing raw images including color enhancement tools, compositing and masking utilities, pixel correction tools and HDR utilities. Read more

5 Best Free and Open source NAS Software for Linux

In the 21st century, huge innovations have been made in various sectors, particularly the technological region, which has completely changed the world’s dimensions. The strides at which new technology has been developed and improved upon from its predecessors would surely be something that our ancestors would marvel at. Humans have gone in a very short time from making stone arrows and straw huts to developing smartphones and automated robots, and these advancements are continuously growing without slowing down. However, this huge transition has also brought forward some adverse effects as our machines are now subjected to more cyber-attacks and security issues. Data is one of the most important factors in the world today, and it is exactly that which is the most vulnerable. Therefore, it is necessary to implement procedures that would help in keeping your data secure. One excellent way is to use NAS software, which helps in keeping backups of your data. This shall also be the topic of our discussion in this article, where we will be looking at the top 5 free and open-source NAS software available on Linux. Read more

Pioneer DDJ-RR DJ Controller To Be Supported By The Linux 5.11 Kernel

For aspiring DJs wanting to mix beats under Linux, the Pioneer DJ DDJ-RR controller should be working come Linux 5.11 early next year. The Pioneer DDJ-RR is quite a capable ~$699 USD DJ controller that offers the mixing potential of many higher-end Pioneer DDJ devices but at a lower price point and geared for introductory DJs. The DDJ-RR is a two-channel controller and offers all of the common dedicated controls most DJs would make use of while offering high quality audio output. The DDJ-RR is designed to be used under Windows with the Rekordbox DJ software. However, this DJ controller will now work with Linux 5.11+ so it can be used with software like the open-source Mixxx DJ software package. Read more