Youphptube - home youtube based on yunohost

Hello there,

anyine is interresting to create an installer for this apps on yunohst :slight_smile:

https://www.youphptube.com/

thanks to all

1 Like

hello à tous
j’aimerais vraiment installé cette apps sur yunohost,

personne n’a idée, j’ai essayé de regarder la doc

mais je comprend rien

need help please

You can start to package the app. This app will have long testing phase for YunoHost as developer don’t support Nginx. officially.
Here is the nginx config by users who tried it on nginx

 location / {
        rewrite ^/$ /view/ last;
        }
        location /bootstrap {
        rewrite ^/bootstrap/(.+)$ /view/bootstrap/$1 last;
        }
        location /js {
        rewrite ^/js/(.+)$ /view/js/$1 last;
        }
        location /css {
        rewrite ^/css/(.+)$ /view/css/$1 last;
        }
        location /img {
        rewrite ^/img/(.+)$ /view/img/$1 last;
        }
        location /page {
        rewrite ^/page/([0-9]+)/?$ /view/?page=$1 last;
        }
        location /videoOnly {
        rewrite ^/videoOnly/?$ /view/?type=video last;
        }
        location /audioOnly {
        rewrite ^/audioOnly/?$ /view/?type=audio last;
        }
        location = /download {
        rewrite ^(.*)$ /view/downloadExternalVideo.php last;
        }
        location = /downloadNow {
        rewrite ^(.*)$ /objects/downloadVideo.php last;
        }
        location = /getDownloadProgress {
        rewrite ^(.*)$ /objects/downloadVideoProgress.php last;
        }
        location = /about {
        rewrite ^(.*)$ /view/about.php last;
        }
    location = /contact {
    rewrite ^(.*)$ /view/contact.php last;
    }
    location = /sendEmail {
    rewrite ^(.*)$ /objects/sendEmail.json.php last;
    }
    location = /captcha {
    rewrite ^(.*)$ /objects/getCaptcha.php last;
    }
    location /monitor {
    rewrite ^/monitor/(.+)$ /objects/ServerMonitor/$1 last;
    }
    location /cat {
    rewrite ^/cat/([A-Za-z0-9-]+)/?$ /view/?catName=$1 last;
    }
    location /video {
    rewrite ^/video/([A-Za-z0-9-_.]+)/?$ /view/?videoName=$1 last;
    }
    location /videoEmbeded {
    rewrite ^/videoEmbeded/([A-Za-z0-9-_.]+)/?$ /view/videoEmbeded.php?videoName=$1 last;
    }
    location = /upload {
    rewrite ^(.*)$ /view/mini-upload-form/ last;
    }
    location = /fileUpload {
    rewrite ^(.*)$ /view/mini-upload-form/upload.php last;
    }
    location /uploadStatu {
    rewrite ^/uploadStatus /view/mini-upload-form/videoConversionStatus.php last;
    }
    location = /user {
    rewrite ^(.*)$ /view/user.php last;
    }
    location = /users {
    rewrite ^(.*)$ /view/managerUsers.php last;
    }
    location = /users.json {
    rewrite ^(.*)$ /objects/users.json.php last;
    }
    location = /updateUser {
    rewrite ^(.*)$ /objects/userUpdate.json.php last;
    }
    location = /savePhoto {
    rewrite ^(.*)$ /objects/userSavePhoto.php last;
    }
    location = /addNewUser {
    rewrite ^(.*)$ /objects/userAddNew.json.php last;
    }
    location = /deleteUser {
    rewrite ^(.*)$ /objects/userDelete.json.php last;
    }
    location = /recoverPass {
    rewrite ^(.*)$ /objects/userRecoverPass.php last;
    }
    location = /saveRecoverPassword {
    rewrite ^(.*)$ /objects/userRecoverPassSave.json.php last;
    }
    location = /signUp {
    rewrite ^(.*)$ /view/signUp.php last;
    }
    location = /createUser {
    rewrite ^(.*)$ /objects/userCreate.json.php last;
    }
    location = /usersGroups {
    rewrite ^(.*)$ /view/managerUsersGroups.php last;
    }
    location = /usersGroups.json {
    rewrite ^(.*)$ /objects/usersGroups.json.php last;
    }
    location = /addNewUserGroups {
    rewrite ^(.*)$ /objects/userGroupsAddNew.json.php last;
    }
    location = /deleteUserGroups {
    rewrite ^(.*)$ /objects/userGroupsDelete.json.php last;
    }
    location = /ads {
    rewrite ^(.*)$ /view/managerAds.php last;
    }
    location = /addNewAd {
    rewrite ^(.*)$ /objects/video_adsAddNew.json.php last;
    }
    location = /ads.json {
    rewrite ^(.*)$ /objects/video_ads.json.php last;
    }
    location = /deleteVideoAd {
    rewrite ^(.*)$ /objects/video_adDelete.json.php last;
    }
    location /adClickLo {
    rewrite ^/adClickLog /objects/video_adClickLog.php last;
    }
    location = /categories {
    rewrite ^(.*)$ /view/managerCategories.php last;
    }
    location = /categories.json {
    rewrite ^(.*)$ /objects/categories.json.php last;
    }
    location = /addNewCategory {
    rewrite ^(.*)$ /objects/categoryAddNew.json.php last;
    }
    location = /deleteCategory {
    rewrite ^(.*)$ /objects/categoryDelete.json.php last;
    }
    location = /orphanFiles {
    rewrite ^(.*)$ /view/orphanFiles.php last;
    }
    location = /mvideos {
    rewrite ^(.*)$ /view/managerVideos.php last;
    }
    location = /videos.json {
    rewrite ^(.*)$ /objects/videos.json.php last;
    }
    location = /deleteVideo {
    rewrite ^(.*)$ /objects/videoDelete.json.php last;
    }
    location = /addNewVideo {
    rewrite ^(.*)$ /objects/videoAddNew.json.php last;
    }
    location = /refreshVideo {
    rewrite ^(.*)$ /objects/videoRefresh.json.php last;
    }
    location = /setStatusVideo {
    rewrite ^(.*)$ /objects/videoStatus.json.php last;
    }
    location = /reencodeVideo {
    rewrite ^(.*)$ /objects/videoReencode.json.php last;
    }
    location = /addViewCountVideo {
    rewrite ^(.*)$ /objects/videoAddViewCount.json.php last;
    }
    location = /saveComment {
    rewrite ^(.*)$ /objects/commentAddNew.json.php last;
    }
    location /comments {
    rewrite ^/comments.json/([0-9]+)$ /objects/comments.json.php?video_id=$1 last;
    }
    location = /login {
    rewrite ^(.*)$ /objects/login.json.php last;
    }
    location = /logoff {
    rewrite ^(.*)$ /objects/logoff.php last;
    }
    location = /like {
    rewrite ^(.*)$ /objects/like.json.php?like=1 last;
    }
    location = /dislike {
    rewrite ^(.*)$ /objects/like.json.php?like=-1 last;
    }
    location /update {
    rewrite ^/update/?$ /update/update.php last;
    }
    location = /siteConfigurations {
    rewrite ^(.*)$ /view/configurations.php last;
    }
    location = /updateConfig {
    rewrite ^(.*)$ /objects/configurationUpdate.json.php last;
    }
    location = /charts {
    rewrite ^(.*)$ /view/charts.php last;
    }

It will need an encoder too for proper working.
You will need to take suggestions from github issue page: https://github.com/DanielnetoDotCom/YouPHPTube/issues?utf8=✓&q=nginx

Hi !
Did anyone here manage to get youphptube working on Yunohost ?

Hello for me

no way to install it on yunohost,
so i bought a second raspberry, to add youphp on it,

and using yunohst for a redirct in https to yunohsoht

and works cool

the only problem i can’t use the streaming with that i don’t how make a redirct corretly :’(

1 Like

pour ceux que cela interesse voici comment faire une install sur un raspberry :

first install all necessary :

sudo apt-get install apache2 php7.0 libapache2-mod-php7.0 php7.0-mysql php7.0-curl php7.0-gd php7.0-intl mysql-server mysql-client ffmpeg git libimage-exiftool-perl phpmyadmin && cd /var/www/html && sudo git clone https://github.com/DanielnetoDotCom/YouPHPTube.git && cd /var/www/html && sudo git clone https://github.com/DanielnetoDotCom/YouPHPTube-Encoder.git && sudo apt-get install python && sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl && sudo chmod a+rx /usr/local/bin/youtube-dl && sudo a2enmod rewrite

4 > modifiy the source code because of old Mysql (5.0) version the databases will not created if u not modify files likes this :

sudo nano /var/www/html/YouPHPTube/install/database.sql

replace this line 52 :
clean_title VARCHAR(255) NOT NULL,
by
clean_title VARCHAR(191) NOT NULL,

5> Change the video directory with u sharing network :

so my videos datas is in sharing directory : /media/FlexGoHome/YouPHPTube/videos

and second i create a ln -s :

sudo ln -s /media/FlexGoHome/YouPHPTube/videos/ /var/www/html/YouPHPTube/videos

do the same for encoder :

sudo ln -s /media/FlexGoHome/YouPHPTube/videos-encoder/videos/ /var/www/html/YouPHPTube-Encoder/

6> modifie apache to have a redirection with domain name :
for now no https only http :
so my domaine will be this :

youtube.domaine.fr and youtube-encoder.domaine.fr

sudo nano /etc/apache2/sites-available/youphptube.conf

coller :

<VirtualHost *:80>
	ServerAdmin youphptube@youtube.domaine.fr
	ServerName youtube.domaine.fr
	ServerAlias www.youtube.domaine.fr
	
	DocumentRoot /var/www/html/YouPHPTube

	<Directory /var/www/html/YouPHPTube>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all
	</Directory>

	ErrorLog /var/log/apache2/youphptub-error.log
	LogLevel warn
	CustomLog /var/log/apache2/youphptub-access.log combined

</VirtualHost>


<VirtualHost *:80>
	ServerAdmin youphptube-encoder@youtube-encoder.domaine.fr
	ServerName youtube-encoder.domaine.fr
	ServerAlias www.youtube-encoder.domaine.fr
	
	DocumentRoot /var/www/html/YouPHPTube-Encoder

	<Directory /var/www/html/YouPHPTube-Encoder>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all
	</Directory>

	ErrorLog /var/log/apache2/youphptube-encoder-error.log
	LogLevel warn
	CustomLog /var/log/apache2/youphptube-encoder-access.log combined

</VirtualHost>

sudo a2ensite youphptube.conf

7> Now u can go to :

http://youtube-encoder.mydomaine.fr/install/index.php
http://youtube.mydomaine.fr/install/index.php

8> Remove folder install :

sudo rm /var/www/html/YouPHPTube/install/ -R
sudo rm /var/www/html/YouPHPTube-Encoder/install/ -R

edit to access to phpmyadmin u need create a new mysql user :

  1. Connect to mysql

sudo mysql --user=root mysql

  1. Create a user for phpMyAdmin

Run the following commands (replacing some_pass by the desired password):

CREATE USER ‘phpmyadmin’@‘localhost’ IDENTIFIED BY ‘some_pass’;
GRANT ALL PRIVILEGES ON . TO ‘phpmyadmin’@‘localhost’ WITH GRANT OPTION;
FLUSH PRIVILEGES;

If your phpMyAdmin is connecting to localhost, this should be enough.

1 Like

Hello un petit up pour une intégration yunohost ?

Tu peux regarder du côté de peertube qui est déjà packagé et qui marche très bien : https://github.com/YunoHost-Apps/peertube_ynh.
Sauf s’il y a certaines features de youphptube que tu ne retrouves pas dans peertube ?

Sauf erreur Peertube ne fonctionne pas sur Raspberry, ce qui me semble être le problème de @Issa ?

Peertube est system avec des videos partagés via p2p, ça ne m’interesse pas, je veux lire uniquement mes videos en local, pas des videos partagé.

de plus youphptube, permet de récuéprer des videos en ligne, en utilisant youtube-dll

donc c’est vraiment un super outil, je cherche toujours à voir comment le faire fonctionner avec nginx au lieu d’apache

merci

en plus