Quantcast
Channel: EasyEngine Community Forum - Latest posts
Viewing all articles
Browse latest Browse all 12639

Redirect domain to another folder

$
0
0

Hi thaipop!

**

OPTION A

** (if you used the ee command "ee site create fr.domain.com --somesuffix" and want to keep the possibly created databases, directory structure etc.)
you need to navigate via ssh / sftp tool to the following location on your server:

/etc/nginx/sites-available/

and open / edit this file:

fr.domain.com

find the line that starts like this:

root /var/www/fr.domain.com/htdocs/;

change the path like so:

root /var/www/domain.com/htdocs/;

Save and close file.

Now run either:

ee stack restart --nginx
or
service nginx restart

That's it! You changed the webroot path and anyone accessing fr.domain.com will now reach domain.com instead.

OPTION B

** (if you used the ee command "ee site create fr.domain.com --somesuffix" and want to get rid of possibly created databases, directory structure

first run
ee site delete fr.domain.com
or
ee site delete blog.domain.com

then follow steps below.

or if you did not use the site create command at all yet)
you need to navigate via ssh / sftp tool to the following location on your server:

/etc/nginx/sites-available/

and open / edit the following file:

domain.com

find the line that reads something like this:

server_name domain.com www.domain.com;

edit that line like so:

server_name domain.com www.domain.com blog.domain.com fr.domain.com;

Save the file and run either

ee stack restart --nginx
or
service nginx restart

Now anyone accessing blog.domain.com or fr.domain.com will be redirected to domain.com content.

Best
Saskia


Viewing all articles
Browse latest Browse all 12639

Trending Articles