On Your Site
Local Development
Site Code
Guides
Site Configuration
Content Management
Forms
Form API
Templates
Local Development
Add New Site
Clone the repository
The next step is to git clone the repository you want to work with in terminal, cd into the folder you would like to clone the repository into e.g. sites, and type git clone along with the repository.
$ git clone git@gitserver.com:dijon/newsite/dijon_site_newsite.git
Add new site to the server
Open up the config folder in the Dijon projects directory and open up the folder
localdev, the file to look for is the nginx.conf file. Once you have found that
copy and paste one of the existing servers, change the server name to be the
name you want (e.g. newsite.local.dijon.host
) and change the root to reflect
the name of the corresponding site specific folder that you want to work on
(e.g. /var/www/sites/dijon_site_newsite/www_frontend
).
server {
server_name site.local.dijon.host;
listen 8000;
root /var/www/sites/dijon_site_dijon_site/www_frontend;
include /etc/config/nginx_server_common.conf;
}
server {
server_name new.local.dijon.host;
listen 8000;
root /var/www/sites/dijon_site_newsite/www_frontend;
include /etc/config/nginx_server_common.conf;
}
Add the site to the hosts database
In the parent directory of your site type the following command:
$ sudo nano /etc/hosts
Add your local site to the list and type Ctrl-X to exit the nano interface.
127.0.0.1 localhost
127.0.1.1 computer
127.0.0.1 admin.dijon.local
127.0.0.1 site.local.dijon.host
127.0.0.1 newsite.local.dijon.host
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
The site should now be viewable in the browser e.g. http://newsite.local.dijon.host
Add the site in the admin interface
Add the site to under Admin > Sites and add access to the site for your user under Admin > Users your users list in the admin interface.