Difference between revisions of "HTTP"
Jump to navigation
Jump to search
(→Nginx) |
|||
Line 62: | Line 62: | ||
==== Logging and stats ==== | ==== Logging and stats ==== | ||
+ | See also [[Server#Monitoring_and_analytics]] | ||
+ | |||
[http://linux.die.net/man/8/logrotate logrotate] | [http://linux.die.net/man/8/logrotate logrotate] | ||
+ | Combined Log Format | ||
+ | LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined | ||
+ | |||
+ | apache; | ||
+ | * http://httpd.apache.org/docs/1.3/logs.html | ||
+ | |||
+ | nginx config; | ||
+ | * http://wiki.nginx.org/HttpLogModule | ||
error_log /var/log/nginx/error.log; | error_log /var/log/nginx/error.log; | ||
access_log /var/log/nginx/access.log; | access_log /var/log/nginx/access.log; | ||
Line 69: | Line 79: | ||
* http://articles.slicehost.com/2010/8/27/reading-nginx-web-logs | * http://articles.slicehost.com/2010/8/27/reading-nginx-web-logs | ||
* http://gadelkareem.com/2012/07/01/nginx-error-log-reader/ | * http://gadelkareem.com/2012/07/01/nginx-error-log-reader/ | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==== Control panels ==== | ==== Control panels ==== |
Revision as of 08:50, 22 July 2012
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
- 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;
Tools
- https://github.com/perusio/nginx_ensite - nginx_ensite and nginx_dissite for quick virtual host enabling and disabling
Logging and stats
See also Server#Monitoring_and_analytics
logrotate
Combined Log Format
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined
apache;
nginx config;
error_log /var/log/nginx/error.log; access_log /var/log/nginx/access.log;
- http://articles.slicehost.com/2010/8/27/reading-nginx-web-logs
- http://gadelkareem.com/2012/07/01/nginx-error-log-reader/