Is it possible to rename backend?

Dear all,

I was wondering whether it is possible to rename backend folder to other, for example backside?

I don’t want my operator users to find out that there is backend (administrator) site easily. I am not really convinced with user/password only protection. I understand that I may implement two stage authentication. But it is too complex in my case. I just need a simple one.

Or do you have any other advice?

TIA

Daniel

‘backside’ ? :lol:

You need to understand that, with the advanced template, you need to set up two different web roots.

One for front and one for back.

The front should point to


/home/you/your_site/frontend/web/

The back should point to


/home/you/your_site/backend/web/

What you call ‘front’ and ‘back’ wholly depends on you, and how you have set up your domain / subdomain.

So, you can have ‘front’ be ‘yoursite.com’ and ‘back’ be [i]secretadmin.yoursite.com

[/i]How you set that up has nothing to do with how the files are organized and how the folders are named. ;)

You can consider using ssl client certificate authentication for your backend site. It’s probably the most efficient way to make a secure site.

I have just installed certificates from Let’s Encrypt. They are free :slight_smile:

Oh, I have to try it, too. :rolleyes:

I’ve been using self-certificates.

Hi jacmoe & softark,

Thank you so much for your prompt replies. I agree with self-certificates. But I am afraid it is overkill my need.

Probably, I need to rephrase my question, if I want to rename 'backend to ‘backside’, is that just rename it or should I also rename some other settings?

I am not sure where to update such settings if any.

Like some website suggest different directories structure for yii 1.1 and I need to update some paths like path to config files, path to runtme, etc

Once again thank you so much for your help.

You should be aware that if you rename the directory, then you also need to update the namespaces in all of your files.

None of it. Do nothing :)

Talk to Apache and name it what you want.

That is the best way to do this for the advanced template.

Because it is two Yii applications with two document roots.

I hope you understand ;)

You should be reminded a basic concept … "url" is different from "path".

“backend” is a directory name of the document root of a web. Something like “/var/www/backend” or “C:/Apache/httdocs/backend”. It doesn’t affect the url of the web site. It can be “http://admin.daniel.com/” or “https://backside.daniel.com/” or whatever you like.

Renaming the directory name of the document root has nothing to do with the security of the web.

@jacmoe,

Thank you for the advice. I use it already, but somehow I do not think about it ;(

@softark,

Yes. I agree. This is a silly security practice. Renaming the directory is not a good security practice. I used to think that if user does not know the url, they cannot mess with it. By having general url name for backend, like backend, administration, administrator, etc. User can guess it and halfway through the backend site.

I should try the certificates login. Any guidance on where to start?

You still don’t understand. I think. :)

Let’s say you have your site in a directory called ‘mysite’ - here:


/var/www/mysite

You have two web roots, then:


/var/www/mysite/frontend/web

and


/var/www/mysite/backend/web

It does not matter to anyone but you and your webserver what the names of the directories are - none at all.

Take a look:


<VirtualHost *:80>

	DocumentRoot "/var/www/mysite/frontend/web/"

	ServerName mysite.com

	<Directory "/var/www/mysite/frontend/web/">

    	AllowOverride All

    	Require all granted

	</Directory>

</VirtualHost>


<VirtualHost *:80>

	DocumentRoot "/var/www/mysite/backend/web/"

	ServerName owaeiufawlkejf.com

	<Directory "/var/www/mysite/backend/web/">

    	AllowOverride All

    	Require all granted

	</Directory>

</VirtualHost>



With the code above, http://owaeiufawlkejf.com will be the link to the backend. :)

Edit:

This requires you to acquire the owaeiufawlkejf.com domain, of course …