Coder Social home page Coder Social logo

Comments (14)

asapach avatar asapach commented on June 29, 2024

@zobrak, it should work both ways. The only thing to keep in mind is that if you build the URL programmatically, you must urlencode the path, e.g. / becomes %2F.

Can you share the torrent/magnet link that is broken for you?

from peerflix-server.

zobrak avatar zobrak commented on June 29, 2024

This one doesn't work for example

http://ppfr.it/2hsv

from peerflix-server.

asapach avatar asapach commented on June 29, 2024

Works for me, e.g.: http://localhost:9000/torrents/dbcc055d503485928e52f349acf179812b777c4f/files/%5Bwww.Cpasbien.pe%5D%20Tristesse.Club.2014.FRENCH.DVDRip.XviD-SVR%2F%5Bwww.Cpasbien.pe%5D%20Tristesse.Club.2014.FRENCH.DVDRip.XviD-SVR.avi

from peerflix-server.

zobrak avatar zobrak commented on June 29, 2024

I don't see what I can do...

from peerflix-server.

zobrak avatar zobrak commented on June 29, 2024

Here is my apache log :

88.183.241.107 - - [10/Oct/2014:10:01:16 +0200] "GET /socket.io/1/xhr-polling/8h7Ei6JAy4AJw_W5CFLf?t=1412928078371 HTTP/1.1" 200 489 "https://stream.zobrak.net/" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.101 Safari/537.36"


XXX.XXX.XXX.XXX - - [10/Oct/2014:10:01:17 +0200] "GET /socket.io/1/xhr-polling/8h7Ei6JAy4AJw_W5CFLf?t=1412928079308 HTTP/1.1" 200 491 "https://stream.domain.tld/" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.101 Safari/537.36"


XXX.XXX.XXX.XXX - - [10/Oct/2014:10:01:18 +0200] "GET /torrents/dbcc055d503485928e52f349acf179812b777c4f/files/%5Bwww.Cpasbien.pe%5D%20Tristesse.Club.2014.FRENCH.DVDRip.XviD-SVR%2F%5Bwww.Cpasbien.pe%5D%20Tristesse.Club.2014.FRENCH.DVDRip.XviD-SVR.avi HTTP/1.1" 404 875 "https://stream.domain.tld/" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.101 Safari/537.36"

Here is console log :

GET / 200 15ms - 637b


GET /styles/df04649e.vendor.css 200 13ms - 97.08kb

GET /scripts/8d96e24b.vendor.js 200 56ms - 263.37kb
GET /styles/8b6a747f.main.css 200 20ms - 1.71kb
GET /scripts/fb0914cf.scripts.js 200 7ms - 1.67kb
GET /views/main.html 200 7ms - 2.75kb
info - handshake authorized 8h7Ei6JAy4AJw_W5CFLf
GET /torrents 304 341ms
warn - websocket connection invalid
info - transport end (undefined)
GET /bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff 304 81ms
GET /torrents 304 567ms
info - transport end (close timeout)
info - transport end (close timeout)

And here is my vhost :

<VirtualHost *:80>
ServerAdmin [email protected]
ServerName stream.domain.tld
Redirect / https://stream.domain.tld

<VirtualHost *:443>
SSLEngine on
SSLProtocol all -SSLv2
SSLProxyEngine On
SSLProxyCheckPeerCN on
SSLProxyCheckPeerExpire on
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM
SSLCertificateFile /etc/ssl/certs/somecertfile.pem
SSLCertificateKeyFile /etc/ssl/private/somekeyfile.key
LogLevel warn
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined
ServerSignature Off
ServerAdmin [email protected]
ServerName stream.domain.tld

ProxyPass http://localhost:9000/ ProxyPassReverse http://localhost:9000/

... I don't know where else can I check. Maybe the torrents directory permissions ?

from peerflix-server.

asapach avatar asapach commented on June 29, 2024

Can you show me the console log matching this one from apache log:
XXX.XXX.XXX.XXX - - [10/Oct/2014:10:01:18 +0200] "GET /torrents/dbcc055d503485928e52f349acf179812b777c4f/files/%5Bwww.Cpasbien.pe%5D%20Tristesse.Club.2014.FRENCH.DVDRip.XviD-SVR%2F%5Bwww.Cpasbien.pe%5D%20Tristesse.Club.2014.FRENCH.DVDRip.XviD-SVR.avi HTTP/1.1" 404

My guess is that apache doesn't proxy this request properly. Try doing this without apache and try other reverse proxies, e.g. nginx or haproxy.

from peerflix-server.

zobrak avatar zobrak commented on June 29, 2024

Nothing happens in console while looking for the movie. By the way, files that are not in sub folders don't work no more today

from peerflix-server.

asapach avatar asapach commented on June 29, 2024

If nothing happens in the console, it means that the request doesn't get to peerflix-server.

from peerflix-server.

zobrak avatar zobrak commented on June 29, 2024

Maybe i'm saying bullshit, but if it was a handling issue with apache, why can I get the home page ? and why requests to socket.io goes well ?

from peerflix-server.

asapach avatar asapach commented on June 29, 2024

No idea, maybe apache doesn't like the urlencoded path?
As for socket.io, you should set up apache to proxy websockets for it to work properly: http://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html

from peerflix-server.

asapach avatar asapach commented on June 29, 2024

Here's an nginx config that seems to work for me:

server {
        listen 443;
        server_name example.com;

        ssl on;
        ssl_certificate /etc/nginx/ssl/server.crt;
        ssl_certificate_key /etc/nginx/ssl/server.key;

        location / {
                proxy_pass http://localhost:9000;
                proxy_http_version 1.1;
        }

        location /socket.io/ {
                proxy_pass http://localhost:9000/socket.io/;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
        }
}

from peerflix-server.

zobrak avatar zobrak commented on June 29, 2024

Actually I've got a "Cannot GET / " message when trying to browse the peerflix server.
in the console there is :
GET / 404 163ms
GET /favicon.ico 404 23ms
GET /favicon.ico 404 20ms
I have tried with both apache and nginx and I have this message...

from peerflix-server.

asapach avatar asapach commented on June 29, 2024

Does it work without a reverse proxy? Can you try and re-install peerflix-server?

from peerflix-server.

zobrak avatar zobrak commented on June 29, 2024

I have uninstalled peerflix-server with "npm uninstall -g peerflix-server" and then reinstalled it.

Now it works fine but only with nginx. But no more with apache and the same 404 message.

I tried to link apache with nginx and 404 still here with apache. It should be as you said earlier a trouble with the way apache use url encoding or a misconfiguration on my server.

Thanks for help

from peerflix-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.