ls -l `which init`
lrwxrwxrwx 1 root root 20 фев 15 2017 /sbin/init -> /lib/systemd/systemd
strings /sbin/init | awk 'match($0, /(upstart|systemd|sysvinit)/) { print toupper(substr($0, RSTART, RLENGTH));exit; }'
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
tcpdump port 9000 -A | strings
http {
...
log_format scripts '$document_root$fastcgi_script_name > $request';
server {
...
access_log /var/log/nginx/mysite-scripts.log scripts;
...
}
}
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
location ~ \.php$ {
try_files $uri = 404;
fastcgi_pass 127.0.0.1:9001;
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
Вопрос - почему время загрузки страницы не ускорилось?
http {
....
gzip on;
gzip_http_version 1.0;
gzip_min_length 512;
gzip_buffers 64 8k;
gzip_comp_level 5;
gzip_proxied any;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
...
}
curl -H "Accept-Encoding: gzip,deflate" -I http://mysite.ru/index.html
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 24 Nov 2017 11:32:00 GMT
Content-Type: text/html
Last-Modified: Tue, 12 Apr 2016 06:48:17 GMT
Connection: keep-alive
ETag: W/"570c9a31-576"
Content-Encoding: gzip
ab -n 1 -H "Accept-Encoding: gzip,deflate" http://mysite.ru/index.html
Concurrency Level: 1
Time taken for tests: 0.128 seconds
Complete requests: 1
Failed requests: 0
Total transferred: 3405 bytes
HTML transferred: 3025 bytes
Requests per second: 7.80 [#/sec] (mean)
Time per request: 128.249 [ms] (mean)
Time per request: 128.249 [ms] (mean, across all concurrent requests)
Transfer rate: 25.93 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 90 90 0.0 90 90
Processing: 38 38 0.0 38 38
Waiting: 38 38 0.0 38 38
Total: 128 128 0.0 128 128
Подскажите, верно ли утверждение, что я прочитаю книгу по системному программированию в UNIX и смогу после этого программировать в Linux без изменений?
Прежде чем удалять /data/2017, мне нужно точно убедиться, что данные берутся именно из /mnt/2017.
Что не нравится Nginx?
-----BEGIN CERTIFICATE-----
MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/
................
................
JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYo
Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
-----END CERTIFICATE-----
openssl x509 -in /etc/ssl/certs/domains/sea3.ru/cert.crt -noout -text -purpose
ls -la ~/backup.sh
chmod a+x ~/backup.sh
cat /var/log/syslog | grep CRON | grep backup.sh
@midnight bash /full/path/backup.sh >/var/log/backup.log 2>&1
@midnight bash /full/path/backup.sh >/dev/null 2>&1
@midnight bash /full/path/backup.sh >/dev/null
http {
# Websocket
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
...
lingering_time 86400;
proxy_ssl_verify off;
proxy_ssl_session_reuse on;
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
proxy_cache off;
proxy_store off;
set $ssl off;
set $port 80;
if ($scheme = https) {
set $ssl on;
set $port 443;
}
location / {
proxy_pass https://192.168.XX.XX:8443/;
gzip off;
proxy_read_timeout 600s;
proxy_connect_timeout 600s;
proxy_redirect off;
proxy_buffering off;
proxy_request_buffering off;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Ssl $ssl;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $port;
proxy_set_header X-Frame-Options SAMEORIGIN;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Referer "";
}
}
}