[Adminsysters] peertube installation

ignifugo ignifugo at insicuri.net
Mon Oct 18 17:42:10 CEST 2021


On 14/10/21 16:45, Donna Metzlar wrote:
> Hi,
>
> On 14/10/2021 16:34, mara wrote:
>> only nginx support. ignifugo suggested to try to install nginx along
>> with apache. any thoughts on this?
> I always struggle with mixing Apache and Nginx on a system with multiple
> domains, because port 80 can't be shared. I tried learning Docker to get
> around this once and for all but got stuck and never finished the plan.

hum I think that peertube has awebserver inside (maeby node) that 
exposes on the 9000 port

so maybe we can retry using apache to pass on the port 443. I did some 
experiment in the service machine on the mesh network when I lived and I 
saw peertube working only with apache. so i have hope! :)

I used this configuration, a bit different because I have not https in 
local network.

hugs see you tomorrow

igni

<VirtualHost *:80 [::]:80>

     ServerName hueco.valsamoggia.ninux.org
     ServerAdmin webmaster at localhost

   Header always set X-Content-Type-Options nosniff
   Header always set X-Robots-Tag none
   Header always set X-XSS-Protection "1; mode=block"

   # Bypass PeerTube webseed route for better performances
   Alias /static/webseed /var/www/peertube/storage/videos
   <Location /static/webseed>
           # Clients usually have 4 simultaneous webseed connections, so 
the real limit is 3MB/s per client
           SetOutputFilter RATE_LIMIT
           SetEnv rate-limit 800

           SetEnvIf Request_Method "GET" GETMETH=1

           Header set Access-Control-Allow-Origin "*" env=GETMETH
           Header set Access-Control-Allow-Headers 
"Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type" 
env=GETMETH
           Header set Access-Control-Allow-Methods "GET, OPTIONS" 
env=GETMETH
           SetEnvIf GETMETH "1" dontlog

           SetEnvIf Request_Method "OPTIONS" OPTIONSMETH=1

           Header set Access-Control-Allow-Origin "*" env=OPTIONSMETH
           Header set Access-Control-Allow-Headers 
"Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type" 
env=OPTIONSMETH
           Header set Access-Control-Allow-Methods "GET, OPTIONS" 
env=OPTIONSMETH
           Header set Access-Control-Max-Age "1000" env=OPTIONSMETH
           Header set Content-Type "text/plain charset=UTF-8" 
env=OPTIONSMETH
           Header set Content-Length "0" env=OPTIONSMETH
   </Location>

   <Location /videos/embed>
           Header unset X-Frame-Options
   </Location>

   ProxyPreserveHost On
   ProxyTimeout 600

   # Websocket tracker
   RewriteEngine On
   RewriteCond %{HTTP:Upgrade} websocket [NC]
   RewriteRule /(.*) ws://0.0.0.0:9000/$1 [P,L]

   <Location />
           ProxyPass http://0.0.0.0:9000/ timeout=600
   </Location>

   # Get client ip intact
   RemoteIPHeader X-Client-IP
   RemoteIPHeader X-Forwarded-For

   # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
     # error, crit, alert, emerg.
     # It is also possible to configure the loglevel for particular
     # modules, e.g.
     # LogLevel info ssl:warn

     ErrorLog ${APACHE_LOG_DIR}/error.log
#    CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>



More information about the Adminsysters mailing list