Code Monkey home page Code Monkey logo

Comments (12)

HenriWahl avatar HenriWahl commented on July 28, 2024

I additionally found that now no file could be downloaded anymore from website because their URLs are completely messed up.
Before with 1.6.1 I used an EXTRA_HTTP_SERVER_ROOT = 'https://my.server.org/seafile/http' in seahub_settings.py for not having to use port 8082 externally - it is redirected by Apache internally. But now I get this error:

Page not found (404)
Request Method: GET
Request URL: http://seafile.internal:8000/seafile/httphttps://my.server.org/seafile/http/files/e994a960/example.JPG

As you see the whole URL of the link is a non-working mixup.

from seahub.

freeplant avatar freeplant commented on July 28, 2024

You should not use EXTRA_HTTP_SERVER_ROOT, it is not in the document.

from seahub.

HenriWahl avatar HenriWahl commented on July 28, 2024

There was no other way to to omit port 8082 being public and this worked very well. Where there any important changes regarding this to let this not work now?

from seahub.

HenriWahl avatar HenriWahl commented on July 28, 2024

There are several reasons not to use HTTP transfer via port 8082 and use another URL rewritten by Apache:

  • as default insecure transport of files via plain HTTP on port 8082 through the Internet - a little bit inconsistent, securing the webinterface via HTTPS but transport files via HTTP
  • seahub chooses as default the local server name as part of URL + port 8000 - this does not work outside when the server is behind a NAT
  • one port less to open outside instead of the anyway open port 443 for HTTPS

All these three issues could be solved with that now not working anymore option - wouldn't you consider it as useful if it worked again?

Regards

from seahub.

lins05 avatar lins05 commented on July 28, 2024

Hi,

Based on the url you give,

http://seafile.internal:8000/seafile/httphttps://my.server.org/seafile/http/files/e994a960/example.JPG

I guess you have added "HTTP_SERVER_ROOT" in two places:

Here is the quick fix for you:

  1. Remove the two values above

  2. Add a line in seahub_settings.py

    HTTP_SERVER_ROOT =
    'https://my.server.org/seafile/httphttp://seafile.internal:8000/seafile/httphttps://my.server.org/seafile/http/files/e994a960/example.JPG
    '

  3. Restart seahub

  4. And it should be OK

We'll detail how to use apache/nginx to proxy httpserver in the wiki, since
there have been some users seeking for this.

But anyway, you REALLY should not use the "EXTRA_XXX" way since it's not
documented, and you do not know how it works.

Regards,
Lin

On Wed, Jul 3, 2013 at 4:31 AM, HenriWahl [email protected] wrote:

There are several reasons not to use HTTP transfer via port 8082 and use
another URL rewritten by Apache:

  • as default insecure transport of files via plain HTTP on port 8082
    through the Internet - a little bit inconsistent, securing the webinterface
    via HTTPS but transport files via HTTP
  • seahub chooses as default the local server name as part of URL +
    port 8082 - this does not work outside when the server is behind a NAT
  • one port less to open outside instead of the anyway open port 443
    for HTTPS

All these three issues could be solved with that now not working anymore
option - wouldn't you consider it as useful if it worked again?

Regards


Reply to this email directly or view it on GitHubhttps://github.com//issues/67#issuecomment-20373894
.

from seahub.

HenriWahl avatar HenriWahl commented on July 28, 2024

With the HTTP_SERVER_ROOT options it works now. It didn't in vesion 1.6 so I had to use that crude way, but now it is OK. Thank you!

from seahub.

HenriWahl avatar HenriWahl commented on July 28, 2024

Sorry,
I have to reopen this case, because it partly is still open. The HTTP_SERVER_ROOT made it work, the only flaw is that the URL of a shared document or folder is displayes wrong on the respective web page. It is like the SERVICE_URL is not set, showing the default. If changing the address manually in the browser the right page displays but claims to have the default URL.

from seahub.

HenriWahl avatar HenriWahl commented on July 28, 2024

The problem still persists, instead of replacing local http://myserver:8000 by SERVICE_URL the local URL is used and thus a file cannot be displayed in browser as with seahub 1.6.

Additionally I get an error:

NameError at /seafile/repo/020e7f89-3216-4732-97fc-b820e73e9662/files/

global name 'OFFICE_PREVIEW_MAX_SIZE' is not defined

Request Method: GET
Request URL: http://myserver:8000/seafile/repo/020e7f89-3216-4732-97fc-b820e73e9662/files/?p=/Ralswiek_Buchung.pdf
Django Version: 1.5.1
Exception Type: NameError
Exception Value:

global name 'OFFICE_PREVIEW_MAX_SIZE' is not defined

Exception Location: /opt/seafile/seafile-server-1.7.0.1/seahub/seahub/views/file.py in view_file, line 297
Python Executable: /usr/bin/python2.6
Python Version: 2.6.6
Python Path:

['/opt/seafile/seafile-server-1.7.0.1/seahub',
'/opt/seafile/seafile-server-1.7.0.1/seahub/thirdpart/Djblets-0.6.14.dev-py2.6.egg',
'/opt/seafile/seafile-server-1.7.0.1/seahub/thirdpart/gunicorn-0.16.1-py2.6.egg',
'/opt/seafile/seafile-server-1.7.0.1/seahub/thirdpart/flup-1.0-py2.6.egg',
'/opt/seafile/seafile-server-1.7.0.1/seahub/thirdpart/chardet-2.1.1-py2.6.egg',
'/opt/seafile/seafile-server-1.7.0.1/seahub/thirdpart/Django-1.5.1-py2.6.egg',
'/opt/seafile/seafile-server-1.7.0.1/seafile/lib/python2.7/site-packages',
'/opt/seafile/seafile-server-1.7.0.1/seafile/lib64/python2.7/site-packages',
'/opt/seafile/seafile-server-1.7.0.1/seafile/lib/python2.6/site-packages',
'/opt/seafile/seafile-server-1.7.0.1/seafile/lib64/python2.6/site-packages',
'/opt/seafile/seafile-server-1.7.0.1/seahub/thirdpart',
'/',
'/usr/lib/python2.6',
'/usr/lib/python2.6/plat-linux2',
'/usr/lib/python2.6/lib-tk',
'/usr/lib/python2.6/lib-old',
'/usr/lib/python2.6/lib-dynload',
'/usr/local/lib/python2.6/dist-packages',
'/usr/lib/python2.6/dist-packages',
'/usr/lib/python2.6/dist-packages/PIL',
'/usr/lib/pymodules/python2.6',
'/opt/seafile/seafile-server-1.7.0.1/seafile/lib/python2.7/site-packages',
'/opt/seafile/seafile-server-1.7.0.1/seafile/lib64/python2.7/site-packages',
'/opt/seafile/seafile-server-1.7.0.1/seafile/lib64/python2.6/site-packages']

Server time: Do, 25 Jul 2013 11:52:33 +0200

Any clue?

from seahub.

lins05 avatar lins05 commented on July 28, 2024

What is the URL when you generating the link to the shared document?

On Thu, Jul 25, 2013 at 5:58 PM, HenriWahl [email protected] wrote:

The problem still persists, instead of replacing local
http://myserver:8000 by SERVICE_URL the local URL is used and thus a file
cannot be displayed in browser as with seahub 1.6. Any clue?


Reply to this email directly or view it on GitHubhttps://github.com//issues/67#issuecomment-21544015
.

from seahub.

HenriWahl avatar HenriWahl commented on July 28, 2024

The problem was the same as in #56 because it is a PDF file. With the fix from there it works. Thanks!

from seahub.

HenriWahl avatar HenriWahl commented on July 28, 2024

Sorry, but a small problem still exists in this issue. When I display a file in Browser and press the "Send" button to get its URL for sharing still the local URL http://myserver:8000 is shown there and not the one of SERVICE_URL.
Can you confirm this?

from seahub.

freeplant avatar freeplant commented on July 28, 2024

We have rewritten code related to SERVICE_URL, which will be published in version 1.8 next week. If you still have the problem then, we will look into it carefully.

from seahub.

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.