Webpage unavailable after changing Port

I want to change the port of my seafile’s webpage from 80 to 8443 (and no, it is not https).

So, I changed the following files:


server {
  listen 8443


 SERVICE_URL = http://myseafilehostname:8443 


FILE_SERVER_ROOT = 'http://myseafilehostname:8443/seafhttp'

(I’m not sure about the change in FILE_SERVER_ROOT.)

After restarting nginx and seafile/seahub the webpage is not accessible with
When I undo the changes it is accessible for Port 80.

Can anybody help?


I want to add some information.

With those changes only the website isn’t available. The seafile clients still can connect the server.

Somehow not each client can connect the server :frowning:
Nevertheless when I undo the changes and set the port to 80 in each of the three config files, the server, the website and the clients’ connection work successfully.

But I want to change seafile’s website to port 8443. Can anybody help?

Unfortunately the problem with changing the port to 8443 still exists.

Some additional information, when I try to access the new webpage http://myseafilehostname:8443, the browser shows that the page isn’t available, BUT it also shows that it tries to reach the webpage with the old address with http-default-port 80. In the URL field the browser shows http://myseafilehostname/accounts/login?next=/ and no port 8443. I checked this with different computers which didn’t access my seafile server up to now.

So it seems that nginx (?) redirects to the http default port 80.

// edit:
Now it seems that actually the change to 8443 does take effect. The seafile clients access the server via port 8443. BUT the webpage still isn’t available.

Can anybody help?


Did you change SERVICE_URL and FILE_SERVER_ROOT in web administration? If no, setup port 80 back, change it and then setup port in configs and nginx. Database settings have higher priority then confing one.

No, I changed the port in the config files directly. So now I set it back to port 80 and restarted the services, and used the web administration to change to 8443 and restarted everything again.

Suprisingly it worked and the login page was shown. However after I entered my login credentials again the page not available was shown and the URL didn’t show any port 8443. So now I added “:8443” in the URL manually and the website was shown. Now when I click a menu item on the webpage nearly each time “page not available” is shown. When I correct the URL, everything is ok again.

So it seems to be a problem about caching. However it’s not a problem about my local browser’s cache, because when I empty the local cache the problem still exists. Even on computers which never connected to my seafile server have this problem with their browsers.

So I assume there is a caching problem with nginx on the seafile server. Does anybody know how to empty/flush/refresh nginx’s cache?


Are you using memcached? Try to setup ports like you did before but keep new setup in admin panel

No, I don’t use memcached. I have checked the manual’s chapter about memcached and no, I didn’t install this by accident :grinning:

Can you post nginx config?

nginx.conf and ./sites-enabled/seafile.conf


Oh that’s classic.

Here is solution Solved: Bad URL in request (web interface)

Thanks holantomas, that did the trick.