$(function() {
var updateInterval = 1000;
var dataset = [{
label: "line1",
data: data
}];
var options = {
series: {
shadowSize: 0 // Drawing is faster without shadows
},
yaxis: {
min: -50,
max: 50
},
xaxis: {
show: false
}
};
var plot = $.plot("#placeholder", dataset, options);
function update() {
var ajax_data = null;
$.ajax({
url: "test.html",
success: function(data){
ajax_data = data;
}
});
dataset = [{
label: "line1",
data: ajax_data
}];
plot.setData(dataset);
plot.draw();
setTimeout(update, updateInterval);
}
update();
});
server_name site.ru www.site.ru;
rewrite ^(.*) https://$server_name$1 permanent;
server {
listen 80;
server_name site.ru www.site.ru;
return 301 https://site.ru$request_uri;
}
server {
listen 443 ssl;
server_name www.site.ru;
ssl_certificate /etc/letsencrypt/live/site.ru/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/site.ru/privkey.pem;
return 301 https://site.ru$request_uri;
}
server {
listen 443 ssl;
server_name site.ru;
ssl_certificate /etc/letsencrypt/live/site.ru/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/site.ru/privkey.pem;
access_log /var/www/site.ru/logs/nginx-access.log;
error_log /var/www/site.ru/logs/nginx-error.log;
location / {
proxy_pass http://127.0.0.1:81;
include /etc/nginx/proxy.conf;
}
location ~* \.(jpg|jpeg|gif|png|ico|css|bmp|swf|js)$ {
root /var/www/site.ru/public;
access_log off;
expires 10d;
}
location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
proxy_pass http://127.0.0.1:81;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /usr/share/;
}
}
location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}
}