Change the start page Gitea #5900

Closed
opened 2025-11-02 06:39:48 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @thisisusernameforgithub on GitHub (Aug 26, 2020).

  • Gitea version (or commit ref): 1.12.3
  • Git version: 2.22.0
  • Operating system: Centos 7
  • Database (use [x]):
    • PostgreSQL
  • Can you reproduce the bug at https://try.gitea.io:
    • No
  • Nginx

Description

Thanks to the developers for the convenient service!

I have a question about the start page.

how can I change the start page to have the authorization page instead?

so that when you go to the mygiteadomain.com, the authorization page mygiteadomain.com/user/login appears, and not the welcome page

Originally created by @thisisusernameforgithub on GitHub (Aug 26, 2020). - Gitea version (or commit ref): 1.12.3 - Git version: 2.22.0 - Operating system: Centos 7 - Database (use `[x]`): - [x] PostgreSQL - Can you reproduce the bug at https://try.gitea.io: - [x] No - Nginx ## Description Thanks to the developers for the convenient service! I have a question about the start page. how can I change the start page to have the authorization page instead? so that when you go to the mygiteadomain.com, the authorization page mygiteadomain.com/user/login appears, and not the welcome page
Author
Owner

@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf commented on GitHub (Aug 26, 2020):

If you need any and all pages behind the authorization page, there's a parameter for that in the app.ini config file, section [service].
Simply set REQUIRE_SIGNIN_VIEW to true, as you can see in the screenshot and restart your Gitea instance.
image

Edit:
If LANDING_PAGE in [server] section is set to home the setting above will protect all pages but this one (which is probably fine, there's not much to it apart from saying "hi, I'm this gitea server").
However, if you set LANDING_PAGE to explore or organizations, the very first load of your domain will result in displaying a login page.
That is really not an ideal UX IMO, as that first load (https://mydomain.tld/) is in fact immediately redirected to (https://mydomain.tld/user/login) and it may (will) harm your SEO ranking if that's a thing for you.

@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf commented on GitHub (Aug 26, 2020): If you need any and all pages behind the authorization page, there's a parameter for that in the `app.ini` config file, section `[service]`. Simply set `REQUIRE_SIGNIN_VIEW` to `true`, as you can see in the screenshot and restart your Gitea instance. ![image](https://user-images.githubusercontent.com/61180606/91301465-43b86700-e7a5-11ea-8cf3-4d74f816d696.png) Edit: If `LANDING_PAGE` in `[server]` section is set to `home` the setting above will protect all pages but this one (which is probably fine, there's not much to it apart from saying "hi, I'm this gitea server"). However, if you set `LANDING_PAGE` to `explore` or `organizations`, the very first load of your domain will result in displaying a login page. That is really not an ideal UX IMO, as that first load (https://mydomain.tld/) is in fact immediately redirected to (https://mydomain.tld/user/login) and it may (will) harm your SEO ranking if that's a thing for you.
Author
Owner

@thisisusernameforgithub commented on GitHub (Aug 26, 2020):

If you need any and all pages behind the authorization page, there's a parameter for that in the app.ini config file, section [service].
Simply set REQUIRE_SIGNIN_VIEW to true, as you can see in the screenshot and restart your Gitea instance.
image

thanks for your answer, but this setting is currently enabled on my system.
enabling this parameter does not help. when going to mygiteadomain.com I see the start page (see screenshot)

I want to see the authorization page mygiteadomain.com/user/login after going to mygiteadomain.com
image

@thisisusernameforgithub commented on GitHub (Aug 26, 2020): > If you need any and all pages behind the authorization page, there's a parameter for that in the `app.ini` config file, section `[service]`. > Simply set `REQUIRE_SIGNIN_VIEW` to `true`, as you can see in the screenshot and restart your Gitea instance. > ![image](https://user-images.githubusercontent.com/61180606/91301465-43b86700-e7a5-11ea-8cf3-4d74f816d696.png) thanks for your answer, but this setting is currently enabled on my system. enabling this parameter does not help. when going to mygiteadomain.com I see the start page (see screenshot) I want to see the authorization page mygiteadomain.com/user/login after going to mygiteadomain.com ![image](https://i.ibb.co/sysBnz9/Screenshot-at-Aug-26-15-31-05.png)
Author
Owner

@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf commented on GitHub (Aug 26, 2020):

yep, please see the edit, those are the options if you want to avoid things like http basic auth (assuming you are or are willing to use gitea behing a proxy).

@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf commented on GitHub (Aug 26, 2020): yep, please see the edit, those are the options if you want to avoid things like http basic auth (assuming you are or are willing to use gitea behing a proxy).
Author
Owner

@thisisusernameforgithub commented on GitHub (Aug 26, 2020):

yep, please see the edit, those are the options if you want to avoid things like http basic auth (assuming you are or are willing to use gitea behing a proxy).

Thank you very much for your help!

in the app.ini file:

  • I changed the LANDING_PAGE parameter in the [server] section from "home" to "explore"

and it helped me

@thisisusernameforgithub commented on GitHub (Aug 26, 2020): > yep, please see the edit, those are the options if you want to avoid things like http basic auth (assuming you are or are willing to use gitea behing a proxy). Thank you very much for your help! in the `app.ini` file: - I changed the` LANDING_PAGE` parameter in the` [server]` section from "home" to "explore" and it helped me
Author
Owner

@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf commented on GitHub (Aug 26, 2020):

yep, please see the edit, those are the options if you want to avoid things like http basic auth (assuming you are or are willing to use gitea behing a proxy).

Thank you very much for your help!

in the app.ini file:

  • I changed the LANDING_PAGE parameter in the [server] section from "home" to "explore"

and it helped me

No worries.
I am sorry I overlooked that you indeed are using Gitea behind nginx (mentioned in the OP).
Great this worked, though, no need to mess with basic auth.

@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf commented on GitHub (Aug 26, 2020): > > yep, please see the edit, those are the options if you want to avoid things like http basic auth (assuming you are or are willing to use gitea behing a proxy). > > Thank you very much for your help! > > in the `app.ini` file: > > * I changed the` LANDING_PAGE` parameter in the` [server]` section from "home" to "explore" > > and it helped me No worries. I am sorry I overlooked that you indeed are using Gitea behind nginx (mentioned in the OP). Great this worked, though, no need to mess with basic auth.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5900