Changing public_html directory

7 posts / 0 new
Last post
#1 Tue, 11/20/2018 - 04:36
LeoSilver

Changing public_html directory

Hello I need to change the public_html directory of virtualserver to other virtualserver.

I have this scenario :

// Main site main.com (with ssl)

// User sites (sub-server of main) other.com (with own ssl)

The other.com site I need it to show the public_html directory of main.com

Edit: I got it working by editting /etc/apache/sites-available/other.com.conf changing DocumentRoot. I this the right way?

Tue, 11/20/2018 - 11:58
nazcar

Yeah its is the right way

Mon, 04/29/2019 - 20:57 (Reply to #2)
Qazi Firdous

is there any other way which can also be automated

Mon, 04/29/2019 - 11:29
Qazi Firdous

@LeoSilver Do I need to change only DocumentRoot or other paths also . Can you share your config file; I tried your method but nothing happened.

Mon, 04/29/2019 - 20:55 (Reply to #4)
Qazi Firdous

worked after restarting apache.

Mon, 04/29/2019 - 16:41
Glock24

Maybe using an alias domain would be a betterchoice? You can also generate an SSL cert from Let's Encrypt that covers both domains.

Mon, 04/29/2019 - 20:47 (Reply to #6)
Qazi Firdous

Lets Encrypt has SAN Limit of 100. By using aliases you have to use a single certificate for all aliases thus not feasible for me.