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

Change the default route '/admin' #65

Closed
ljfreelancer88 opened this issue Jul 15, 2020 · 6 comments
Closed

Change the default route '/admin' #65

ljfreelancer88 opened this issue Jul 15, 2020 · 6 comments
Labels
question Further information is requested

Comments

@ljfreelancer88
Copy link

Q A
Bug? no
New Feature? no

Hi, how can I change the default route '/admin'? Instead of https://domain.io/admin, I want it to be https://domain.io/custom-url-for-admin.

Thanks in advance

@alexander-schranz
Copy link
Member

alexander-schranz commented Jul 15, 2020

You need to adjust the admin config/routes admin files , config/packages/security_admin.yaml, public/index.php and need to set the correct cookie path in config/packages/framework_admin.yaml.

Have also a look at the following issue, not all changes there necessary for only changing the admin url: sulu/sulu-docs#495

@ljfreelancer88
Copy link
Author

That's a lot of files to change :) I got breach alert from Chrome though. I have to switched back.

Is it possible to have this in the configuration? Or there's a command that does this.

@alexander-schranz
Copy link
Member

alexander-schranz commented Jul 16, 2020

No there is no command as its uncommon:

See https://github.com/sulu/sulu-demo/pull/60/files as example.

@alexander-schranz alexander-schranz added the question Further information is requested label Jul 16, 2020
@alexander-schranz
Copy link
Member

I'm closing this issue if you run into any problems feel free to comment here or join our slack channel

@Nyholm
Copy link

Nyholm commented May 1, 2021

Oh, the cookie path and fragment path was tricky to find. I did not expect Sulu to set these for me.

@alexander-schranz
Copy link
Member

@Nyholm Thank you for the feedback. We had problems that the website session did logout the admin users and other way around, so we need to configure a different session path for the admin. The fragment path is required because of the 2 kernel setup that admin fragments hit the admin kernel. We are working on getting sulu to a 1 Kernel setup so this 2 tricky configuration should hopefully be gone in the next major release.

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

No branches or pull requests

3 participants