HTTP
Jump to navigation
Jump to search
Google
Basics
- HTTPie is a CLI, cURL-like tool for humans
- httpbin(1) - HTTP Request & Response Service
User and group
See also *nix#Users
Servers
Nginx
- nginx [engine x] is an HTTP and reverse proxy server, as well as a mail proxy server
- The Architecture of Open Source Applications (Volume 2): Nginx
- Configuration
- FullExample
- HttpRewriteModule - rewriting urls
- HttpAuthBasicModule - for directory passwords
- Pitfalls
Site folder location can vary.
/var/www debian /etc/nginx/html arch linux
Site setup
Create 'Server Block' (vhost) config file in
/etc/nginx/sites-available
and later ln -s them in
/etc/nginx/sites-enabled
- ServerBlockExample - Basic examples
- FcgiExample - FastCGI example. Keep seperate and include.
- http://wiki.nginx.org/Wordpress
- https://wiki.archlinux.org/index.php/PhpMyAdmin#NGINX_Configuration
Enable logging in vhost conf;
error_log /var/log/nginx-vhostnamehere.log error;
Modules
- HttpLimitConnModule - This module makes it possible to limit the number of concurrent connections for a defined key such as, for example, an ip address.
Tools
- https://github.com/perusio/nginx_ensite - nginx_ensite and nginx_dissite for quick virtual host enabling and disabling
Apache
Other
Performance
- http://stevesouders.com/efws/
- http://www.portent.com/blog/design-dev/how-we-made-portent-com-really-freaking-fast.htm
Web server logs
Combined Log Format
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined
old skool;
Apache
Nginx
error_log /var/log/nginx/domain.name/error.log; access_log /var/log/nginx/domain.name/access.log;
- http://articles.slicehost.com/2010/8/27/reading-nginx-web-logs
- http://gadelkareem.com/2012/07/01/nginx-error-log-reader/
GoAccess
- GoAccess is an open source real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems. It provides fast and valuable HTTP statistics for system administrators that require a visual server report on the fly.
Control panels
Analytics
Piwik
- Piwik is downloadable, Free/Libre (GPLv3 licensed) real time web analytics software. It provides you with detailed reports on your website visitors; the search engines and keywords they used, the language they speak, your popular pages, and much more.
- User Guide
- Log Analytics - combined format logs (apache, nginx)