• Applications
  • [Discussion] TARDIStart : une startpage pour votre seedbox

Aerya wrote:
sept. 05 09:45:47 KS-4C nginx[26631]: nginx: [emerg] open() "/etc/nginx/conf.d/php" fa...:45
Non ?
Je vais te dire oui, mais c'est pas pour autant que je comprends de quoi tu parles
Le tuto rutorrent utilisait /etc/nginx/conf.d/php et /etc/nginx/conf.d/cache au départ
Un jour c'est devenu /etc/nginx/conf.d/php.conf et /etc/nginx/conf.d/cache.conf
Et les ennuies ont commencé ^^ Y'a encore des tutos qui se baladent entre les deux versions
Ex.
Ben là il te dit qu'il y a une erreur ligne 45.
@Aerya: ok, je comprends

@ex_rat: ah ok, je pensais que c'est moi qui avait chié dans la colle. Perso j'ai utilisé ton script, je vais essayé de dépatouiller ça avec mes petites connaissances
Si pas trop vieux ça doit être cache.conf & php.conf
Tu peux regarder dans ton rutorrent.conf pour être certain du truc
Question con, mais j'arrive pas a trouver mon rutorrent.conf

Dans
/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;
T'es sérieux là ? ^^
Y'a pourtant pas beaucoup de lignes dans le tuto de Jede
https://mondedie.fr/d/8067
edit: voilà, c'est mieux
edit2: j'ai corrigé le tuto tardistart
Je sais que j'ai pas vraiment les yeux en face des trous vu les nuits compliquées qu'on passe avec le petit, j'ai repéré 2 erreurs que j'ai corrigé dans la syntaxe, j'ai donc remis propre
 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:~# 
Il te manque une { à la fin je crois
        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;
                }
        }
Je l'ai mais tout a la fin de mon fichier /etc/nginx/sites-enabled/rutorrent.conf
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-manager
Fais plus attention quand tu tapes, ça c'est pas du boulot le " foiré à la fin....
auth_basic "TARDIStart Admin Page »;

Le dernier } à la fin du fichier ferme la première ligne server { et rien d'autre.


La partie "tardisart" doit être comme ça:
        ## 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é ^^
Ex.
Rho putain la loose, j'ai regarde 50 fois cette portion, faut vraiment que je dorme.
Un grand merci
un mois plus tard
Salut,

Une idée pour mettre le target _blank ? Je vois pas trop ou le mettre

merci
Bonjour,

Je n'ai pas bien compris ta question emiatej. Un target _blank se met dans une url de la façon suivante :
<a target="_blank" href="urlasaisir"></a>
7 jours plus tard
Salut
J'ai utilisé le script de xavier sur debian 8 (inspiré de celui de ex_rat) avec tardistart pré-installé
J'essaie de configurer la page de tardistart avec les liens qui vont bien ( rutorrent.. etc) mais lorsque je me rends sur tardistart/admin pour modifer les url ça ne fonctionne pas ! A chaque fois que je fais une modif celle ci n'est pas prise en compte.
Est ce que c'est un problème de droit ?
Merci
Edit: Bon ok un peu boulet.... !! C'était bien un soucis de droit !! c'est réglé !! Désolé !!
Salut

oui c'est un problème de droit que j'ai pas mis dans mon script donc tu va faire
chown -R www-data:www-data /var/www/tartdistart
chmod 755 /var/www/tartdistart
et tu actualise la page

dans tout les cas merci de ce bug!je corrige ça de-suite

ps: pas toi le boulet mais moi pour avoir oublier ça
Je suis un peu boulet quand même !! Je pose une question dans laquelle je réponds !!
Sinon merci pour le script (RatXabox) qui est nickel
et merci Jedediah pour tardistart et bien d'autres
7 jours plus tard
Bonsoir;

J'ai tout lu depuis le départ de ce topic, mais rien qui y ressemble.

Tardistart fonctionne; mais avec une multitude d'erreurs dans var/log/nginx/error.log du type :
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 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:
https://github.com/Jedediah04/TARDIStart/issues/21

Mais la solution ????

Merci
Salut,

si mes souvenir sont bon j'avais pareil dans mes logs .rien de grave je pense, on dirais que 3 variable soit pas défini (ou autre (guillemets,apostrophe)) a titre icon et lien.

a confirmé par @Jedediah

bonne soirée
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:
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à ....

Merci.
super ..mais j’espère que ça ne pose pas de problème plus tard

sinon oui connaisseur php ou @Jedediah
Bonsoir;

ça marchait quand même, mais 3 x 24 environ; soit plus de 70 lignes qui polluaient le fichier error.log à chaque login, ça faisait beaucoup à mon goût !!!

Bizarre d'ailleurs que personne ici, n'ait relevé ce truc, à croire que certains ne regardent pas souvent les logs !!!!

De plus, ça peut noyer une erreur plus embêtante dans cette masse, qui passerait inaperçue.

Même si c'est inévitable d'en avoir (timeout, etc..), j'essaie de faire en sorte d'en avoir le moins possible, et d'autant plus issues d'une page d'accès, qui de part sa vocation est la plus fréquentée.

A+++
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:
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à ....

Merci.

Salut,

Je viens de regarder ça, cela viens de la fonction uptime et de la manière dont les résultats sont parsés.
Chez moi, j'ai a même erreur que toi, car la date et l'heure d'uptime sont au début de la string.

Du coup uptime[1] n'est pas du tout la string qui contient l'heure exacte d'uptime, mais une string vide, et donc hours[1] n'existe pas du tout, d'ou l'erreur.
Le fix est de remplacer :
    $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.

Voila
Salut;
Salut;

Merci shyne...ça colle ...

Même si c'est un détail, ce ne serait pas plus mal que l'initiateur du tuto le modifie tant qu'a faire.

Le bash, ça va, mais le php, je ne m'y suis jamais versé...

A+++
Salut..

Oui vraiment bizarre qu'il ait pas vu (peut-être par manque de temps et difficile aussi tu es sur plusieurs projets, de tout faire.)

Moi si je pouvais mettre mes log en fond écran ça serait le top.(ho la commande tail chauffe bien)
Car je suis assez maniaque, si une erreur dans les logs je cherche comment la règler..

Au pire vous envoyez une copie sur le git pour qu'il le mette à jour....

Au top si problème corrigé
Salut;
Je n'ai plus aucune erreur dans error.log suite aux 2 modifications réalisées, par contre pour la dernière plus d'erreurs, mais pas d'affichage jours, ni heures, ni minutes;

http://www.hostingpics.net/viewer.php?id=796926uptimestart.png

Ceci dit, comme j'ai rebooté le serveur et qu'à l'heure actuelle mon uptime n'est de 1:36 ; peut être faut il attendre d'atteindre 1 jour pour voir l'affichage; ceci dit même si ça ne fonctionne pas ce n'est pas grave, j'aime autant ça que des lignes qui polluent le fichier error.log de nginx.

A+
Pour afficher l'uptime, il parse le retour de la fonction uptime (fallait se trouer pour la trouver cette commande).

À mon avis la position de la chaîne hh:mm:ss doit pas être au même endroit suivant l'os. Chez moi ma modif fonctionne bien, en vrai je pense qu'il faut juste tester différente valeur et voir si ca marche et si ca fait pas d'erreur.

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(&quot;../assets/img/bg1.jpg&quot;);">
<?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

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 😉

5 jours plus tard

Merci pour ton boulot, c'est bien sympa 🙂

5 jours plus tard

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

22 jours plus tard

Hello !

Petit problème de mon coté, j'ai une erreur 403 pour la page admin de mon coté ... une idée ? merci

    blacksly

    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 🙂

    2 mois plus tard

    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.