We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
How to use the same files for different domains
-
- Posts: 12
- Joined: Thu Mar 09, 2017 6:53 am
How to use the same files for different domains
I need one system:
1 Domain1.ru
2 Domain2.ru
but the files are identical
But it uses one file for all the index.php files in the domain.
How can I implement this function, taking into account the use of CSS and JS, as well as php
Only for php I can use include or require_once, but how to do this for CSS and JS
1 Domain1.ru
2 Domain2.ru
but the files are identical
But it uses one file for all the index.php files in the domain.
How can I implement this function, taking into account the use of CSS and JS, as well as php
Only for php I can use include or require_once, but how to do this for CSS and JS
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: How to use the same files for different domains
Not very clear on what you are trying to achieve but if the second site is an exact copy of the first one, you may symlink
secondsite/public_html to firstsite/public_html
This was you won't need to maintain two copies, any changes on first one will reflect on 2nd one. Also make sure to host both domains under one VestaCP user to avoid permission problems.
secondsite/public_html to firstsite/public_html
Code: Select all
ln -s full-path-to-firstsite/public_html full-path-to-secondsite/public_html
Re: How to use the same files for different domains
Why not use alias for domain1 ?