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

When trying to install Shaarli by accessing the domain name, a 404 error occurred. #2092

Open
thetiny99 opened this issue Jul 5, 2024 · 2 comments
Labels
docker containers & cloud server support installation and configuration issues

Comments

@thetiny99
Copy link

Hello, I uploaded the complete installation package(shaarli-v0.13.0-full) to the server, but when I tried to install Shaarli using the domain name, I encountered a 404 error, which is very confusing.

After accessing the domain name, I noticed that the address bar redirected to mydomain.com/install, but displayed a 404 Not Found error from nginx. I searched almost the entire internet and couldn't find a similar case to mine. Could you please provide some assistance? Thank you.

I used the AMH server panel for installation, which is quite popular and comes pre-configured with the server environment. I have already set up the permissions as per the official documentation.

20240705163759

@nodiscc nodiscc added server support installation and configuration issues labels Jul 5, 2024
@nodiscc
Copy link
Member

nodiscc commented Jul 5, 2024

Hi,
your web server needs to be configured as described in https://shaarli.readthedocs.io/en/master/Server-configuration.html#nginx. When nginx is used, notably the fastcgi_split_path_info must be set correctly for URL rewriting to work.

Please paste your web server/virtualhost configuration (and/or ensure all necessary configuration directives are set).

@thetiny99
Copy link
Author

Hi, your web server needs to be configured as described in https://shaarli.readthedocs.io/en/master/Server-configuration.html#nginx. When nginx is used, notably the fastcgi_split_path_info must be set correctly for URL rewriting to work.

Please paste your web server/virtualhost configuration (and/or ensure all necessary configuration directives are set).

Hi, thanks for your reply and answer.

I have now re-installed using docker, which is very fast!

However, now that the website is running successfully, a new problem has arisen, although I followed the official documentation step by step without missing any steps. However, I found that when I visit my domain name https://mydomain.com, the website can be opened normally, but when I visit https://www.mydomain.com, it cannot be opened, and the browser prompts ERR_TOO_MANY_REDIRECTS.

To solve this problem, I tried the following operations, but none of them worked:

  1. Open the /root/shaarli/.nev file and check the domain name configuration. It seems that there is no problem. The host name is only configured with mydomain.com
  2. Edit the label of the shaarli_shaarli_1 container directly in the portainer panel and confirm that the values ​​of traefik.domain and traefik.frontend.rule are only mydomain.com instead of www.mydomain.com
  3. Check the domain name resolution record and confirm that only two A records (www and @) are configured, and there are no redundant records.
  4. Confirm that nginix is ​​not installed to rule out conflicts in this regard.
  5. Confirm that the cookies of the local browser have been deleted, and multiple browsers and networks have been changed.
  6. Try to restart the entire server, restart [shaarli_shaarli_1] and shaarli_traefik_1 containers.
  7. Confirm that /root/.nev is empty, and only /root/shaarli/.nev is configured

None of the above attempts solves the problem that www.mydomain.com cannot be accessed. The browser still prompts ERR_TOO_MANY_REDIRECTS.

This makes me very confused. I hope the official can give some help. Thank you!

Attached is the content of the /root/shaarli/.nev file:
SHAARLI_VIRTUAL_HOST=mydomain.com
SHAARLI_LETSENCRYPT_EMAIL=[email protected]
SHAARLI_DOCKER_TAG=latest

@nodiscc nodiscc added the docker containers & cloud label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker containers & cloud server support installation and configuration issues
Projects
None yet
Development

No branches or pull requests

2 participants