[[TableOfContents]] = How does web site logging work at May First/People Link? = == Overview == Web servers have the ability to keep track of your computer's IP address, the particular web page you are visiting, the date and time you visisted, and other pieces of information about you, like what kind of computer and what kind of web browser you are using. For many of us, this information is critically useful. We use it to find out what is the most popular page on our web site, how many people are visiting our site and how long are they staying. We can keep track of whether our audience is increasing or decreasing. This information helps us make better web sites and has a minimal impact on the privacy of the people viewing our web sites. However, during government investigations (such as the Trump administration's [https://mayfirst.org/en/2017/content-statement-justice-department-demands-dreamhost/ investigation into the counter-inaugural protests]), this information can be subpoenaed and used against us. While most of us have a hard time converting an IP address to a particular individual, the government can use their legal powers to do exactly that by forcing our Internet Service Providers (e.g. Verizon and Comcast) to tell them which customer was using a given IP at a given date and time. == May First/People Link web server logging == At May First/People Link you have the option to enable or disable logging. If it is enabled, you can see the logs for any web site from your organization by looking in the filesystem on your primary server. For example, if the member organization named `foo` has a web site named `example.org`, the logs for that web site can be found at: {{{ /home/members/foo/sites/example.org/logs/ }}} In that directory, the file named `web.log` is the most recent log, `web.log.1` is from the previous full week, and `web.log.2.gz`, `web.log.3.gz`, etc. are compressed logs from previous weeks. (This is the [http://httpd.apache.org/docs/current/logs.html#accesslog Apache access log].) In addition, you will see `error.log`, which has the same naming convention. The `web.log` files are "access" logs - meaning they have a line for every item on your web site that was requested. `error.log` shows errors that were encountered. These logs, written to by the Apache web server that runs your site, and will include any PHP errors and notices caused by your site. This is useful for diagnosing errors in the functioning of your site and checking for potential problems indicated by notices. In short, read Apache logs for [http://docs.php.net/manual/en/function.error-log.php PHP errors]. == Turn On web logging == If you don't see any files called `error.log`, you will need to add the following line to your Web Config in the [https://members.mayfirst.org/cp Members Control Panel]. Replace `MEMBER-NAME` with your member name and `DOMAIN-NAME` with your domain name: {{{ ErrorLog /home/members/MEMBER-NAME/sites/DOMAIN-NAME/logs/error.log }}} If you don't see any files called `web.log`, you will need to add the following line: {{{ CustomLog /home/members/MEMBER-NAME/sites/DOMAIN-NAME/logs/web.log custom }}} == Turn Off web logging == Alternatively, you may want to [wiki:faq/server/turn-off-web-logging turn off all logging].