Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

How to use the same files for different domains

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
3 posts • Page 1 of 1
kiberdemon
Posts: 12
Joined: Thu Mar 09, 2017 6:53 am

How to use the same files for different domains
  • Quote

Post by kiberdemon » Tue Aug 29, 2017 9:43 am

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
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: How to use the same files for different domains
  • Quote

Post by mehargags » Wed Aug 30, 2017 7:35 pm

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

Code: Select all

ln -s full-path-to-firstsite/public_html full-path-to-secondsite/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.
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: How to use the same files for different domains
  • Quote

Post by skurudo » Thu Aug 31, 2017 11:14 am

Why not use alias for domain1 ?
Top


Post Reply
  • Print view

3 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password