Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SERVICE_URL in ccnet/ccnet.conf ignored #67

Closed
HenriWahl opened this issue Jul 1, 2013 · 12 comments
Closed

SERVICE_URL in ccnet/ccnet.conf ignored #67

HenriWahl opened this issue Jul 1, 2013 · 12 comments

Comments

@HenriWahl
Copy link
Contributor

Hi,
since server 1.7.0.1 the option SERVICE_URL in ccnet/ccnet.conf seems to be ignored, at least any shared URL has at once the default port 8000 URL instead of the one configured. It worked with 1.6.1 before.

@HenriWahl
Copy link
Contributor Author

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.

@freeplant
Copy link
Member

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

@HenriWahl
Copy link
Contributor Author

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?

@HenriWahl
Copy link
Contributor Author

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

@lins05
Copy link
Contributor

lins05 commented Jul 3, 2013

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 notifications@github.com 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
.

@HenriWahl
Copy link
Contributor Author

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!

@HenriWahl
Copy link
Contributor Author

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.

@HenriWahl
Copy link
Contributor Author

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?

@lins05
Copy link
Contributor

lins05 commented Jul 25, 2013

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

On Thu, Jul 25, 2013 at 5:58 PM, HenriWahl notifications@github.com 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
.

@HenriWahl
Copy link
Contributor Author

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

@HenriWahl
Copy link
Contributor Author

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?

@freeplant
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants