Rudloff / alltube

Web GUI for youtube-dl
GNU General Public License v3.0
2.94k stars 584 forks source link

ERR_TOO_MANY_REDIRECTS #340

Closed rayfun closed 3 years ago

rayfun commented 3 years ago

New issue

Your environment

Please answer these questions when reporting a new issue:

What is your operating system (Windows, Linux, OSX, etc.)? Ubuntu 20.04

What is your web server (Apache, IIS, etc.)? Apache/2.4.46 (Ubuntu)

What version of AllTube are you using? latest master

How did you install AllTube (with Git or with a release package)? https://github.com/Rudloff/alltube/archive/master.zip

What version of PHP are you using? 7.4.14

What version of Python are you using? 2.7.18

What version of youtube-dl are you using? 2020.11.12

Do you get any PHP-related errors in your webserver's logs? No

What is the content of your config/config.yml file? Copied from config.example.yml

---
# Path to your youtube-dl binary
youtubedl: vendor/ytdl-org/youtube-dl/youtube_dl/__main__.py

# Path to your python binary
python: /usr/bin/python

# An array of parameters to pass to youtube-dl
params:
    - --no-warnings
    - --ignore-errors
    - --flat-playlist
    - --restrict-filenames
    - --no-playlist

# True to enable audio conversion
convert: false

# True to enable advanced conversion mode
convertAdvanced: false

# List of formats available in advanced conversion mode
convertAdvancedFormats: [mp3, avi, flv, wav]

# Path to your ffmpeg binary
ffmpeg: /usr/bin/ffmpeg

# ffmpeg logging level.
ffmpegVerbosity: error

# Path to the directory that contains the phantomjs binary.
phantomjsDir: /usr/bin/

# True to disable URL rewriting
uglyUrls: false

# True to stream videos through server
# Set to "ask" if you want to allow it but not enable by default.
stream: false

# True to enable remux mode (merge best audio and best video)
remux: false

# MP3 bitrate when converting (in kbit/s)
audioBitrate: 128

# App name
appName: alltube YT-Download

# Generic formats supported by youtube-dl
genericFormats:
    best/bestvideo: Best
    bestvideo+bestaudio: Remux best video with best audio
    worst/worstvideo: Worst

# Enable debug mode.
debug: false

# True to enable audio conversion mode by default
defaultAudio: false

# False to disable convert seek functionality
convertSeek: true

Please provide the URL of a video that causes the issue.

Describe your issue

Opening my URL results in too many redirects. https://dom.tld/alltube redirects to /alltube/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/

alltube should be run below vhost Alltube specific location in domain site configuration looks like this:

<Location "/alltube">
    AllowOverride All
    Alias /var/www/html/vhosts/alltube
    AuthType Basic
    AuthDigestProvider file
    AuthName "Restricted Access"
    AuthUserFile /etc/apache2/.htpasswd
    Require user <user>
</Location>

Using default .htaccess

<ifmodule mod_mime.c>
    AddType application/x-web-app-manifest+json .webapp
    Addtype font/truetype .ttf
</ifmodule>

<ifmodule mod_expires.c>
    ExpiresActive On
    ExpiresByType application/javascript "access plus 1 week"
    ExpiresByType text/css "access plus 1 week"
    ExpiresByType image/png "access plus 1 week"
    ExpiresByType image/jpeg "access plus 1 week"
    ExpiresByType image/svg+xml "access plus 1 week"
    ExpiresByType font/truetype "access plus 1 week"
</ifmodule>

FileETag None

<ifmodule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{HTTP_HOST} ^alltube\.herokuapp\.com$ [NC]
    RewriteRule ^(.*)$ https://www.alltubedownload.net/$1 [R=301,L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [QSA,L]
</ifmodule>

<ifmodule mod_filter.c>
    <IfModule mod_deflate.c>
        AddOutputFilterByType DEFLATE text/css text/html application/javascript font/truetype
    </IfModule>
</ifmodule>

<ifmodule mod_headers.c>
    Header set X-Frame-Options DENY
    Header set X-Content-Type-Options nosniff
    Header set X-XSS-Protection "1; mode=block"
    Header set Referrer-Policy no-referrer
</ifmodule>

Error in browser: This page isn’t working

redirected you too many times. Try clearing your cookies. ERR_TOO_MANY_REDIRECTS
Rudloff commented 3 years ago

AllTube never redirects to index.html so you probably have something in you server config doing that.