Je vais te dire oui, mais c'est pas pour autant que je comprends de quoi tu parlesAerya wrote:Non ?
sept. 05 09:45:47 KS-4C nginx[26631]: nginx: [emerg] open() "/etc/nginx/conf.d/php" fa...:45

Je vais te dire oui, mais c'est pas pour autant que je comprends de quoi tu parlesAerya wrote:Non ?
sept. 05 09:45:47 KS-4C nginx[26631]: nginx: [emerg] open() "/etc/nginx/conf.d/php" fa...:45
/var/www/rutorrent/conf
j'ai un fichier config.php
<?php
// configuration parameters
// for snoopy client
@define('HTTP_USER_AGENT', 'Mozilla/5.0 (Windows NT 6.0; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0', true);
@define('HTTP_TIME_OUT', 30, true); // in seconds
@define('HTTP_USE_GZIP', true, true);
$httpIP = null; // IP string. Or null for any.
@define('RPC_TIME_OUT', 5, true); // in seconds
@define('LOG_RPC_CALLS', false, true);
@define('LOG_RPC_FAULTS', true, true);
// for php
@define('PHP_USE_GZIP', false, true);
@define('PHP_GZIP_LEVEL', 2, true);
$schedule_rand = 10; // rand for schedulers start, +0..X seconds
$do_diagnostic = true;
$log_file = '/tmp/errors.log'; // path to log file (comment or leave blank to disable logging)
$saveUploadedTorrents = true; // Save uploaded torrents to profile/torrents directory or not
$overwriteUploadedTorrents = false; // Overwrite existing uploaded torrents in profile/torrents directory or make unique name
$topDirectory = '/'; // Upper available directory. Absolute path with trail slash.
$forbidUserSettings = false;
$scgi_port = 5000;
$scgi_host = "127.0.0.1";
// For web->rtorrent link through unix domain socket
// (scgi_local in rtorrent conf file), change variables
// above to something like this:
//
// $scgi_port = 0;
// $scgi_host = "unix:///tmp/rpc.socket";
$XMLRPCMountPoint = "/RPC2"; // DO NOT DELETE THIS LINE!!! DO NOT COMMENT THIS LINE!!!
$pathToExternals = array(
"php" => '', // Something like /usr/bin/php. If empty, will be found in PATH.
"curl" => '', // Something like /usr/bin/curl. If empty, will be found in PATH.
"gzip" => '', // Something like /usr/bin/gzip. If empty, will be found in PATH.
"id" => '', // Something like /usr/bin/id. If empty, will be found in PATH.
"stat" => '', // Something like /usr/bin/stat. If empty, will be found in PATH.
);
$localhosts = array( // list of local interfaces
"127.0.0.1",
"localhost",
);
$profilePath = '../share'; // Path to user profiles
$profileMask = 0777; // Mask for files and directory creation in user profiles.
// Both Webserver and rtorrent users must have read-write access to it.
// For example, if Webserver and rtorrent users are in the same group then the value may be 0770.
$tempDirectory = null; // Temp directory. Absolute path with trail slash. If null, then autodetect will be used.
$canUseXSendFile = true; // Use X-Sendfile feature if it exist
$locale = "UTF8";
ou /var/www/rutorrent/conf/users/arck0s
le fichier config.php
<?php
$pathToExternals = array(
"curl" => '/usr/bin/curl',
"stat" => '/usr/bin/stat',
);
$topDirectory = '/home/arck0s';
$scgi_port = 5001;
$scgi_host = '127.0.0.1';
$XMLRPCMountPoint = '/ARCK0S';
et dans /etc/nginx/sites-enabled/rutorrent.conf
j'ai
server {
listen 80 default_server;
listen 443 default_server ssl http2;
server_name _;
index index.html index.php;
charset utf-8;
client_max_body_size 10M;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
include /etc/nginx/conf.d/ciphers.conf;
access_log /var/log/nginx/rutorrent-access.log combined;
error_log /var/log/nginx/rutorrent-error.log error;
error_page 500 502 503 504 /50x.html;
location = /50x.html { root /usr/share/nginx/html; }
auth_basic "seedbox";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd";
location = /favicon.ico {
access_log off;
log_not_found off;
}
## début config accueil serveur ##
location ^~ / {
root /var/www/base;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
satisfy any;
allow all;
}
## fin config accueil serveur ##
## début config TARDIStart
location ^~ /tardistart {
root /var/www;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
satisfy any;
allow all;
location ~ admin {
auth_basic "TARDIStart Admin Page »;
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd_arck0s »;
deny all;
}
}
## fin config TARDIStart
## début config proxy ##
location ^~ /proxy {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
}
## fin config proxy ##
## début config rutorrent ##
location ^~ /rutorrent {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
location ~ /\.svn {
deny all;
}
location ~ /\.ht {
deny all;
}
}
location ^~ /rutorrent/conf/ {
deny all;
}
location ^~ /rutorrent/share/ {
deny all;
}
## fin config rutorrent ##
## début config munin ##
location ^~ /graph {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
}
location ^~ /graph/img {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
error_log /dev/null crit;
}
location ^~ /monitoring {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
}
## fin config munin ##
## début config seedbox-manager ##
location ^~ /seedbox-manager {
alias /var/www/seedbox-manager/public;
include /etc/nginx/conf.d/php-manager.conf;
include /etc/nginx/conf.d/cache.conf;
}
## fin config seedbox-manager ##
## config utilisateurs ##
location /ARCK0S {
include scgi_params;
scgi_pass 127.0.0.1:5001; #ou socket : unix:/home/username/.session/username.socket
auth_basic "seedbox";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd_arck0s";
}
## fin config seedbox-manager ##
## debut config sickrage ##
location /sickrage {
proxy_pass http://127.0.0.1:8081;
#auth_basic Restricted Area; # Si vous voulez protéger...
#auth_basic_user_file htpasswd; # ... par mot de passe, décommentez
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
## fin config sickrage ##
## debut config cakebox-light ##
location /cakebox/ {
rewrite ^/cakebox(/.*)$ $1 break;
proxy_pass http://127.0.0.1:81;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
}
location /cakebox/arck0s/ {
alias /home/arck0s/torrents/;
add_header Content-Disposition "attachment";
satisfy any;
allow all;
}
## fin config cakebox-light ##
}
Edit: visiblement je vois que je n'ai pas la bonne terminaison du coup j'ai remplacer
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
par
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
GNU nano 2.2.6 Fichier : /etc/nginx/sites-enabled/rutorrent.conf
access_log off;
log_not_found off;
}
## début config accueil serveur ##
location ^~ / {
root /var/www/base;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
satisfy any;
allow all;
}
## fin config accueil serveur ##
## début config TARDIStart
location ^~ /tardistart {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
satisfy any;
allow all;
location ~ admin {
auth_basic "TARDIStart Admin Page »;
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd_arck0s";
deny all;
}
## fin config TARDIStart
## début config proxy ##
location ^~ /proxy {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
}
## fin config proxy ##
## début config rutorrent ##
location ^~ /rutorrent {
Mais j'ai toujours mon erreur quand je relance nains et mes connaissances ultra petites me servent vraiment a rien
root@KS-4C:~# service nginx restart
Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details.
root@KS-4C:~# systemctl status nginx.service
● nginx.service - LSB: Stop/start nginx
Loaded: loaded (/etc/init.d/nginx)
Active: failed (Result: exit-code) since lun. 2016-09-05 12:16:47 CEST; 19s ago
Process: 25632 ExecStop=/etc/init.d/nginx stop (code=exited, status=0/SUCCESS)
Process: 28239 ExecStart=/etc/init.d/nginx start (code=exited, status=1/FAILURE)
sept. 05 12:16:47 KS-4C nginx[28239]: nginx: [emerg] unexpected "/" in /etc...52
sept. 05 12:16:47 KS-4C systemd[1]: nginx.service: control process exited, ...=1
sept. 05 12:16:47 KS-4C systemd[1]: Failed to start LSB: Stop/start nginx.
sept. 05 12:16:47 KS-4C systemd[1]: Unit nginx.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
root@KS-4C:~# journalctl -xn
-- Logs begin at mer. 2016-04-13 10:48:01 CEST, end at lun. 2016-09-05 12:17:01 CEST. --
sept. 05 12:16:47 KS-4C nginx[28239]: nginx: [emerg] unexpected "/" in /etc/nginx/sites-enabled/rutorrent.conf:52
sept. 05 12:16:47 KS-4C systemd[1]: nginx.service: control process exited, code=exited status=1
sept. 05 12:16:47 KS-4C systemd[1]: Failed to start LSB: Stop/start nginx.
-- Subject: L'unité (unit) nginx.service a échoué
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- L'unité (unit) nginx.service a échoué, avec le résultat failed.
sept. 05 12:16:47 KS-4C systemd[1]: Unit nginx.service entered failed state.
sept. 05 12:17:01 KS-4C CRON[28252]: pam_unix(cron:session): session opened for user root by (uid=0)
sept. 05 12:17:01 KS-4C CRON[28251]: pam_unix(cron:session): session opened for user root by (uid=0)
sept. 05 12:17:01 KS-4C CRON[28253]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
sept. 05 12:17:01 KS-4C CRON[28254]: (root) CMD (/usr/local/rtm/bin/rtm 16 > /dev/null 2> /dev/null)
sept. 05 12:17:01 KS-4C CRON[28252]: pam_unix(cron:session): session closed for user root
sept. 05 12:17:01 KS-4C CRON[28251]: pam_unix(cron:session): session closed for user root
root@KS-4C:~#
location ^~ /tardistart {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
satisfy any;
allow all;
location ~ admin {
auth_basic "TARDIStart Admin Page";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd_user";
deny all;
}
}
server {
listen 80 default_server;
listen 443 default_server ssl http2;
server_name _;
index index.html index.php;
charset utf-8;
client_max_body_size 10M;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
include /etc/nginx/conf.d/ciphers.conf;
access_log /var/log/nginx/rutorrent-access.log combined;
error_log /var/log/nginx/rutorrent-error.log error;
error_page 500 502 503 504 /50x.html;
location = /50x.html { root /usr/share/nginx/html; }
auth_basic "seedbox";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd";
location = /favicon.ico {
access_log off;
log_not_found off;
}
## début config accueil serveur ##
location ^~ / {
root /var/www/base;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
satisfy any;
allow all;
}
## fin config accueil serveur ##
## début config TARDIStart
location ^~ /tardistart {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
satisfy any;
allow all;
location ~ admin {
auth_basic "TARDIStart Admin Page »;
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd_arck0s";
deny all;
}
## fin config TARDIStart
## début config proxy ##
location ^~ /proxy {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
}
## fin config proxy ##
## début config rutorrent ##
location ^~ /rutorrent {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
location ~ /\.svn {
deny all;
}
location ~ /\.ht {
deny all;
}
}
location ^~ /rutorrent/conf/ {
deny all;
}
location ^~ /rutorrent/share/ {
deny all;
}
## fin config rutorrent ##
## début config munin ##
location ^~ /graph {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
}
location ^~ /graph/img {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
error_log /dev/null crit;
}
location ^~ /monitoring {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
}
## fin config munin ##
## début config seedbox-manager ##
location ^~ /seedbox-manager {
alias /var/www/seedbox-manager/public;
include /etc/nginx/conf.d/php-manager.conf;
include /etc/nginx/conf.d/cache.conf;
}
## fin config seedbox-manager ##
## config utilisateurs ##
location /ARCK0S {
include scgi_params;
scgi_pass 127.0.0.1:5001; #ou socket : unix:/home/username/.session/username.socket
auth_basic "seedbox";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd_arck0s";
}
## fin config seedbox-manager ##
## debut config sickrage ##
location /sickrage {
proxy_pass http://127.0.0.1:8081;
#auth_basic Restricted Area; # Si vous voulez protéger...
#auth_basic_user_file htpasswd; # ... par mot de passe, décommentez
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
## fin config sickrage ##
}
Et meme si je le rajoute ça ne change rien. Je pense que le soucis est vraiment nginx car je n'ai meme plus accès a la page d'accueil de base de seedbox-managerauth_basic "TARDIStart Admin Page »;
## début config TARDIStart
location ^~ /tardistart {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
satisfy any;
allow all;
location ~ admin {
auth_basic "TARDIStart Admin Page";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd_arck0s";
deny all;
}
}
Donc, ton fichier en entier:
server {
listen 80 default_server;
listen 443 default_server ssl http2;
server_name _;
index index.html index.php;
charset utf-8;
client_max_body_size 10M;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
include /etc/nginx/conf.d/ciphers.conf;
access_log /var/log/nginx/rutorrent-access.log combined;
error_log /var/log/nginx/rutorrent-error.log error;
error_page 500 502 503 504 /50x.html;
location = /50x.html { root /usr/share/nginx/html; }
auth_basic "seedbox";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd";
location = /favicon.ico {
access_log off;
log_not_found off;
}
## début config accueil serveur ##
location ^~ / {
root /var/www/base;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
satisfy any;
allow all;
}
## fin config accueil serveur ##
## début config TARDIStart
location ^~ /tardistart {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
satisfy any;
allow all;
location ~ admin {
auth_basic "TARDIStart Admin Page";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd_arck0s";
deny all;
}
}
## fin config TARDIStart
## début config proxy ##
location ^~ /proxy {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
}
## fin config proxy ##
## début config rutorrent ##
location ^~ /rutorrent {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
location ~ /\.svn {
deny all;
}
location ~ /\.ht {
deny all;
}
}
location ^~ /rutorrent/conf/ {
deny all;
}
location ^~ /rutorrent/share/ {
deny all;
}
## fin config rutorrent ##
## début config munin ##
location ^~ /graph {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
}
location ^~ /graph/img {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
error_log /dev/null crit;
}
location ^~ /monitoring {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
}
## fin config munin ##
## début config seedbox-manager ##
location ^~ /seedbox-manager {
alias /var/www/seedbox-manager/public;
include /etc/nginx/conf.d/php-manager.conf;
include /etc/nginx/conf.d/cache.conf;
}
## fin config seedbox-manager ##
## config utilisateurs ##
location /ARCK0S {
include scgi_params;
scgi_pass 127.0.0.1:5001; #ou socket : unix:/home/username/.session/username.socket
auth_basic "seedbox";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd_arck0s";
}
## fin config seedbox-manager ##
## debut config sickrage ##
location /sickrage {
proxy_pass http://127.0.0.1:8081;
#auth_basic Restricted Area; # Si vous voulez protéger...
#auth_basic_user_file htpasswd; # ... par mot de passe, décommentez
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
## fin config sickrage ##
}
sous reserve d'une autre boulette que j'aurais loupé ^^<a target="_blank" href="urlasaisir"></a>
chown -R www-data:www-data /var/www/tartdistart
chmod 755 /var/www/tartdistart
et tu actualise la page2016/10/24 22:47:24 [error] 14679#14679: *5 FastCGI sent in stderr: "PHP message: PHP Notice: Use of undefined constant icone - assumed 'icone' in /var/www/tardistart/index.php on line 101" while reading upstream, client: 11.222.333.44, server: www.mondomaine.fr, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "www.mondomaine.fr"
2016/10/24 22:47:24 [error] 14679#14679: *5 FastCGI sent in stderr: "PHP message: PHP Notice: Use of undefined constant titre - assumed 'titre' in /var/www/tardistart/index.php on line 102" while reading upstream, client: 11.222.333.44, server: www.mondomaine.fr, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "www.mondomaine.fr"
2016/10/24 22:47:24 [error] 14679#14679: *5 FastCGI sent in stderr: "PHP message: PHP Notice: Use of undefined constant lien - assumed 'lien' in /var/www/tardistart/index.php on line 110" while reading upstream, client: 11.222.333.44, server: www.mondomaine.fr, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "www.mondomaine.fr"
2016/10/24 22:47:24 [error] 14679#14679: *5 FastCGI sent in stderr: "PHP message: PHP Notice: Use of undefined constant titre - assumed 'titre' in /var/www/tardistart/index.php on line 110" while reading upstream, client: 11.222.333.44, server: www.mondomaine.fr, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "www.mondomaine.fr"
2016/10/24 22:47:24 [error] 14679#14679: *5 FastCGI sent in stderr: "PHP message: PHP Notice: Use of undefined constant icone - assumed 'icone' in /var/www/tardistart/index.php on line 111" while reading upstream, client: 11.222.333.44, server: www.mondomaine.fr, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "www.mondomaine.fr"
2016/10/24 22:47:24 [error] 14679#14679: *5 FastCGI sent in stderr: "PHP message: PHP Notice: Use of undefined constant titre - assumed 'titre' in /var/www/tardistart/index.php on line 112" while reading upstream, client: 11.222.333.44, server: www.mondomaine.fr, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "www.mondomaine.fr"
2016/10/24 22:47:24 [error] 14679#14679: *5 FastCGI sent in stderr: "PHP message: PHP Notice: Use of undefined constant lien - assumed 'lien' in /var/www/tardistart/index.php on line 114" while reading upstream, client: 11.222.333.44, server: www.mondomaine.fr, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "www.mondomaine.fr"
2016/10/24 22:47:24 [error] 14679#14679: *5 FastCGI sent in stderr: "PHP message: PHP Notice: Use of undefined constant titre - assumed 'titre' in /var/www/tardistart/index.php on line 114" while reading upstream, client: 11.222.333.44, server: www.mondomaine.fr, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "www.mondomaine.fr"
2016/10/24 22:47:24 [error] 14679#14679: *5 FastCGI sent in stderr: "PHP message: PHP Notice: Use of undefined constant icone - assumed 'icone' in /var/www/tardistart/index.php on line 115" while reading upstream, client: 11.222.333.44, server: www.mondomaine.fr, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "www.mondomaine.fr"
2016/10/24 22:47:24 [error] 14679#14679: *5 FastCGI sent in stderr: "PHP message: PHP Notice: Use of undefined constant titre - assumed 'titre' in /var/www/tardistart/index.php on line 116" while reading upstream, client: 11.222.333.44, server: www.mondomaine.fr, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "www.mondomaine.fr"
2016/10/24 22:47:24 [error] 14679#14679: *5 FastCGI sent in stderr: "PHP message: PHP Notice: Use of undefined constant lien - assumed 'lien' in /var/www/tardistart/index.php on line 118" while reading upstream, client: 11.222.333.44, server: www.mondomaine.fr, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "www.mondomaine.fr"
2016/10/24 22:47:24 [error] 14679#14679: *5 FastCGI sent in stderr: "PHP message: PHP Notice: Use of undefined constant titre - assumed 'titre' in /var/www/tardistart/index" while reading upstream, client: 11.222.333.44, server: www.mondomaine.fr, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "www.mondomaine.fr"
2016/10/24 22:47:24 [error] 14679#14679: *5 FastCGI sent in stderr: ".php on line 118" while reading upstream, client: 11.222.333.44, server: www.mondomaine.fr, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "www.mondomaine.fr"
2016/10/24 22:47:24 [error] 14679#14679: *5 FastCGI sent in stderr: "PHP message: PHP Notice: Use of undefined constant icone - assumed 'icone' in /var/www/tardistart/index.php on line 119" while reading upstream, client: 11.222.333.44, server: www.mondomaine.fr, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "www.mondomaine.fr"
2016/10/24 22:47:24 [error] 14679#14679: *5 FastCGI sent in stderr: "PHP message: PHP Notice: Use of undefined constant titre - assumed 'titre' in /var/www/tardistart/index.php on line 120" while reading upstream, client: 11.222.333.44, server: www.mondomaine.fr, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "www.mondomaine.fr"
2016/10/24 22:47:24 [error] 14679#14679: *5 FastCGI sent in stderr: "PHP message: PHP Notice: Use of undefined constant lien - assumed 'lien' in /var/www/tardistart/index.php on line 129" while reading upstream, client: 11.222.333.44, server: www.mondomaine.fr, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "www.mondomaine.fr"
2016/10/24 22:47:24 [error] 14679#14679: *5 FastCGI sent in stderr: "PHP message: PHP Notice: Use of undefined constant titre - assumed 'titre' in /var/www/tardistart/index.php on line 129" while reading upstream, client: 11.222.333.44, server: www.mondomaine.fr, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "www.mondomaine.fr"
ma conf nginx visiblement conforme: location ^~ / {
root /var/www/tardistart;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
satisfy any;
allow all;
location ~ admin {
auth_basic "Tardistart";
auth_basic_user_file "/etc/nginx/passwd/admin_passwd";
deny all;
}
}
Mais ce qui me console, c'est ce message:2016/10/25 11:39:58 [error] 3724#3724: *50 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined offset: 1 in /var/www/tardistart/statsServ.php on line 11
PHP message: PHP Notice: Undefined offset: 1 in /var/www/tardistart/statsServ.php on line 11" while reading upstream, client: 11.222.333.44, server: www.mondomaine.fr, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "www.mondomaine.fr"
La ligne 11 doit correspondre à cette partie du fichier "/var/www/tardistart/statsServ.php":<?php
function getUpTime() {
// UPTIME
exec("uptime", $system); // get the uptime stats
$string = $system[0]; // this might not be necessary
$uptime = explode(" ", $string); // break up the stats into an array
$up_days = $uptime[3]; // grab the days from the array
$hours = explode(":", $uptime[6]); // split up the hour:min in the stats
$up_hours = $hours[0]; // grab the hours
$mins = $hours[1]; // get the mins
$up_mins = str_replace(",", "", $mins); // strip the comma from the mins
return [$up_days, $up_hours, $up_mins];
}
Si un conaisseur php passe par là ....jean-luc wrote:Bonjour;
Merci Xavier de m'avoir éclairé.
J'ai résolu une grosse partie des erreurs en remplaçant:
titre par 'titre'
icone par 'icone'
lien par 'lien"
dans le fichier "/var/www/tardistart/index.php"
Il ne reste plus qu'une seule erreur:
La ligne 11 doit correspondre à cette partie du fichier "/var/www/tardistart/statsServ.php":
2016/10/25 11:39:58 [error] 3724#3724: *50 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined offset: 1 in /var/www/tardistart/statsServ.php on line 11 PHP message: PHP Notice: Undefined offset: 1 in /var/www/tardistart/statsServ.php on line 11" while reading upstream, client: 11.222.333.44, server: www.mondomaine.fr, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "www.mondomaine.fr"
Si un conaisseur php passe par là ....
<?php function getUpTime() { // UPTIME exec("uptime", $system); // get the uptime stats $string = $system[0]; // this might not be necessary $uptime = explode(" ", $string); // break up the stats into an array $up_days = $uptime[3]; // grab the days from the array $hours = explode(":", $uptime[6]); // split up the hour:min in the stats $up_hours = $hours[0]; // grab the hours $mins = $hours[1]; // get the mins $up_mins = str_replace(",", "", $mins); // strip the comma from the mins return [$up_days, $up_hours, $up_mins]; }
Merci.
$hours = explode(":", $uptime[6]); // split up the hour:min in the stats
par : $hours = explode(":", $uptime[1]); // split up the hour:min in the stats
et ça devrait fonctionner.Salut,
donc la je vient de me penché sur ton problème et j'ai peu être une solution très simple
dans index.php
tu remplace
<?php include_once('./statsServ.php');
$uptime = getUpTime()[0];
if(getUpTime()[0] === 1): $uppy = $uptime . " jour"; else: $uppy = $uptime . " jours"; endif;
$json = file_get_contents('admin/service.json');
$data = json_decode($json, true);
?>
par
<?php include_once('./statsServ.php');
$uppy = shell_exec('uptime | tr "," " " | cut -f4-7 -d" "');
$json = file_get_contents('admin/service.json');
$data = json_decode($json, true);
?>
puis dans le ficher statsServ.php tu supprime la fonction getUpTime() (pour rendre le code propre car on s'en sert plus)
c'est pas tres jolie mais sa fonctionne(pas pu tester avec "jour" car je suis sur une vm)
voila...
Bonsoir
alors voici une autre solution pour afficher les heures et les minutes en plus des jours de fonctionnement du serveur
dans index.php se trouvant dans le dossier admin remplacé ceci
<body style="background-image: url("../assets/img/bg1.jpg");">
<?php include_once('../statsServ.php');
$uptime = getUpTime()[0];
if(getUpTime()[0] === 1): $uppy = $uptime . " jour"; else: $uppy = $uptime . " jours"; endif;
$json = file_get_contents('./service.json');
$data = json_decode($json, true);
?>
par cela
<body style="background-image: url(../assets/img/bg1.jpg);">
<?php include_once('../statsServ.php');
//$uppy = getUpTime()[0];
$uppy = uptime ();
$json = file_get_contents('./service.json');
$data = json_decode($json, true);
?>
dans statsServ.php
il faut remplacé ceci
function getUpTime() {
// UPTIME
exec("uptime", $system); // get the uptime stats
$string = $system[0]; // this might not be necessary
$uptime = explode(" ", $string); // break up the stats into an array
$up_days = $uptime[3]; // grab the days from the array
$hours = explode(":", $uptime[6]); // split up the hour:min in the stats
$up_hours = $hours[0]; // grab the hours
$mins = $hours[1]; // get the mins
$up_mins = str_replace(",", "", $mins); // strip the comma from the mins
return [$up_days, $up_hours, $up_mins];
}
par cela
function uptime () {
// UPTIME
$fd = fopen('/proc/uptime', 'r');
$ar_buf = split(' ', fgets($fd, 4096));
fclose($fd);
$sys_ticks = trim($ar_buf[0]);
$min = $sys_ticks / 60;
$hours = $min / 60;
$days = floor($hours / 24) ;
$hours = floor($hours - ($days * 24));
$min = floor($min - ($days * 60 * 24) - ($hours * 60));
if ($days != 0) {
$result = "$days " . "jours ";
}
if ($hours != 0) {
$result .= "$hours " . "heures ";
}
if ($min != 0) {
$result .= "$min " . "minutes ";
}
return $result;
}
pour finir dans le dossier tardistart il faut modifier le fichier index.php
soit ceci
<?php include_once('./statsServ.php');
$uptime = getUpTime()[0];
if(getUpTime()[0] === 1): $uppy = $uptime . " jour"; else: $uppy = $uptime . " jours"; endif;
$json = file_get_contents('admin/service.json');
$data = json_decode($json, true);
?>
par cela
<?php include_once('./statsServ.php');
//$uppy = getUpTime()[0];
$uppy = uptime ();
$json = file_get_contents('admin/service.json');
$data = json_decode($json, true);
//echo "Server Uptime: <b>".uptime()."</b>";
?>
là je pense que ça devrait fonctionner,
j'ai essayé en modifiant les données du texte original du fichier statsServ.php par celui ci
/function getUpTime() {
// UPTIME
exec("uptime", $system); // get the uptime stats
$string = $system[0]; // this might not be necessary
$uptime = explode(" ", $string); // break up the stats into an array
$up_days = $uptime[3]; // grab the days from the array
$hours = explode(":", $uptime[5]); // split up the hour:min in the stats
$up_hours = $hours[0]; // grab the hours
$mins = $hours[1]; // get the mins
$up_mins = str_replace(",", "", $mins); // strip the comma from the mins
$result = [$up_days . " jour(s), " . $up_hours . " Heure(s) et " . $up_mins . " minute(s)."];
return $result;
}
mais avec cette config ça ne fonctionne que par intermitence, il y a des heures ou il n'y a que les jours qui s'affichent, et je n'ai pas trouvé ou ça coince.
Ta solution fait le job Xavier mais je ne l'a trouve pas top.
Bonne fin de soirée
Vous pouvez réutiliser le code du seedbox-manager qui a fait ses preuves ici
Après y a peut-être des lib php plus complète sur https://packagist.org
Magicalex
Salut;
Mais c'est bien sur !!! en plus j'avais déjà utilisé seedbox-manager...
Ce n'était qu'un détail que Jedediah a du zapper, mais avec ça, plus d'erreurs dans error.log durant les premières 24h et en plus, ça n'affiche au moins pas n'importe quoi...
J'ai juste remplacé sa fonction par la tienne dans "statsServ.php"; puis modifier "index.php" comme ceci:
<?php include_once('./statsServ.php');
$uppy = getUpTime();
$json = file_get_contents('admin/service.json');
$data = json_decode($json, true);
?>
-Plus de 24h, ça donne :
http://www.hostingpics.net/viewer.php?id=484932uptime0.png
-Après reboot ceci:
http://www.hostingpics.net/viewer.php?id=556132uptime1.png
Parfait...
Sinon félicitations pour le nouveau site.
A++
Sinon, n'hésitez pas à faire un PR sur Github, ça mange pas de pain et ça contribue au projet.
Je n'ai pas le temps de repasser sur les modifications proposées pour le moment mais si vous faire un PR, je me ferai une joie de le checker et d'intégrer ça à la source
Merci pour ton boulot, c'est bien sympa
Hey Jejediah Dis moi, au debut de ton projet, tu n'avais pas integré un script js permettant un accès rapide a ses sites/liens préféré lorsqu'on pointe sa souris vers le bas de la page ? J'ai le souvenir de ca, mais plus moyen de retomber dessus
Hello !
Petit problème de mon coté, j'ai une erreur 403 pour la page admin de mon coté ... une idée ? merci
Fait nous voir ton vhost
bonsoir
tu as bien remplacé le user de cette ligne par le tiens?
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd_user";
Ha ! l'erreur de débutant ... merci superritou, je n'avais effectivement pas remplacer cette ligne x)
Merci bien
Hello,
J'ai tenté de changer le fond d'écran.
Sans succès. Au mieux j'ai un voile blanc
Vous avez une piste du fichier à modifier?
Merci d'avance.