Page 1 of 1

Have issue when changing root folder directory of domain

Posted: Wed May 13, 2015 3:07 pm
by vandread911
I have 2 domains

example.com (original tld/domain)
&
example.org

i want example.org root directory to be linked to example.com's root directory (where the files are located)
i edited:

Code: Select all

/home/admin/conf/web/httpd.conf
and edited example.org documentroot like so:

Code: Select all

DocumentRoot /home/admin/web/example.com/public_html  
(was DocumentRoot /home/admin/web/example.org/public_html)
so when i browse example.org i will view example.com's files

the index page works but when i view example.org/page1/index.html

it shows this error:
Image

i am running wordpress site on example.com
i also tried editing wp-config.php and adding
define('WP_HOME','http://example.org');
define('WP_SITEURL','http://example.org);

and i also edited WP_options and change the url there aswell in mysql

could anyone help, am i doing something wrong?

Re: Have issue when changing root folder directory of domain

Posted: Sat May 16, 2015 6:55 pm
by vandread911
Anyone have any ideas how to solve this

Re: Have issue when changing root folder directory of domain

Posted: Mon Jun 01, 2015 2:25 pm
by skurudo
I have one ;-)

/home/admin/conf/web/apache2.conf
DocumentRoot
Directory
Directory

Carefully change path to your domain and restart webserver apache2 (httpd in centos)

Re: Have issue when changing root folder directory of domain

Posted: Fri Jun 12, 2015 6:19 am
by vandread911
skurudo wrote:I have one ;-)

/home/admin/conf/web/apache2.conf
DocumentRoot
Directory
Directory

Carefully change path to your domain and restart webserver apache2 (httpd in centos)
I dont have apache2.conf in /home/admin/conf/web/ only httpd.conf
the site i am using is a wordpress site located on 2 tolds example.com (main site) and example.org
when i view example.org everything is fine until i access example.org/page1.html then is shows
Image

i have made the necessary changes in httpd.conf and nothing changes

Re: Have issue when changing root folder directory of domain

Posted: Wed May 02, 2018 10:36 pm
by Ghost
Have you restarted apache and Nginx after making these changes?