vovavm.blogg.se

Awstats install ubuntu 16.04 digitalocean
Awstats install ubuntu 16.04 digitalocean





awstats install ubuntu 16.04 digitalocean

Turns out Django was holding on to connections for too long, so a timeout had to be set in the database settings as well. Helpful for resolving this issue was donturner's answer on this SO question: Īfter some initial testing, I also encountered a "MySQL has gone away" every so often. It's also dumb that I didn't realize this when apparently the MySQL databases on the old server were already using utf8mb4! On the Django side, you need to specify the charset in the database settings. It's kinda dumb that they had to invent a "more utf8 character set" because of their initial dumb implementation.

awstats install ubuntu 16.04 digitalocean

Apparently the "correct" character set to use is utf8mb4 (mb4 -> "multibyte 4" I guess?). This led to errors when I tried importing records into Django that had emojis and the like in text. I created the initial MySQL database with character set utf8, which apparently had the dumb implementation of only supporting 3 bytes for multibyte characters. I didn't want to have two databases running, so that was out. Then I realized I had a Wordpress install I wanted to carry over, and apparently Wordpress needs MySQL, so oops. I initially wanted to use PostgreSQL (since that's what I was using locally) and set that up first. It's also mentioned in the official Wordpress docs, but buried in a bunch of other stuff so less helpful. Except s didn't work! I had to add a directive to the nginx config file for unknown urls to be redirected to index.php: Wordpress worked well enough for the most part. The solution for this came from the Nginx common pitfalls article listed above. I resolved the issue by adding an additional fastcgi_param to the php location block like so: This was with me using the default snippets/nf that was provided with the fastcgi install. I was encountering some issues with fastcgi not mapping requests to the correct PHP script if the Nginx location block was aliased. This guide from DigitalOcean was also helpful: For the setup on Nginx, I found this guide from askubuntu super helpful: I needed PHP since I had a few minor scripts/pages and a Wordpress install that needed PHP. One thing I will note that's not in the article above is that for static files to be served by Nginx, it was easier to just have everything be under /var/Setting up PHP on Nginx This "common pitfalls" article was helpful in resolving issues. Nginx itself was pretty straightforward to set up. I did try setting up both, and found uwsgi's setup much more straightforward and with more helpful step-by-step documentation: Readings suggest minimal performance difference between the two. The choices were either gunicorn or uwsgi. I already knew I wanted to use Nginx (managed hosting on the old server always used Apache), that meant needing to choose a WSGI container for the Django apps. Setting up a webserver and WSGI container Links and references to helpeful resources are included. (And maybe someone else finds it helpful too). # cp /usr/share/GeoIP/GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.I recently did a server migration since I moved to new hosting, The move was from managed/shared hosting to a VPS, these are some notes I took during the process, which I figure might be helpful if I ever tried to do this again. Make sure you have all files in folder /usr/share/GeoIP/GeoLiteCity.dat else copy LoadPlugin=”geoip_city_maxmind GEOIP_STANDARD /usr/share/GeoIP/GeoLiteCity.dat”Įrror opening /usr/share/GeoIP/GeoIPCity.dat at /usr/local/share/perl/5.14.2/Geo/IP/PurePerl.pm line LoadPlugin=”geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat” # cp GeoLiteCity.dat /usr/share/GeoIP/GeoLiteCity.datĮnable AWSTAT configuation for LoadPlugin

awstats install ubuntu 16.04 digitalocean

> install Geo::IP Geo::IPfree Geo::IP::PurePerl URI::Escape Net::IP Net::DNS Net::XWhois Time::HiRes Time::Local configure –prefix=/usr/local/zlib & make & make install # apt-get install build-essential zlib1g-dev apg libgeo-ipfree-perl libnet-ip-perl libnet-dns-perl liburi-perl apache2-utils # vi /etc/logrotate.d/apache2 (Replace create 640 root adm with create 644 root adm) */10 * * * * /usr/share/awstats/tools/update.shġ0 03 * * * /usr/share/awstats/tools/buildstatic.sh Generate stats for AWStats for /var/log/apache2/access.log file (Make sure you have fresh log file) # vi /etc/awstats/Ĭheck you have below settings in /etc/awstats/ There are many log analyzer but AWStats is open source Web analytics reporting tool, It can analyze log files from Apache, WebStar, IIS.Ĭonfiguring for replace with your real domain

#Awstats install ubuntu 16.04 digitalocean free

AWStats is a free analytic tool that generates web, streaming, ftp or mail server statistics, graphically.







Awstats install ubuntu 16.04 digitalocean