UAT (WIP)
This is a guide on how to set up a UAT site. Our UAT sites are all housed on a specific 7DOTS server for the version of PHP you need.
Below are some steps on how to create a UAT site.
- Find the sever for the PHP version you need.
- Create a directory for the site:
cd /var/www/vhost && mkdir new-site && cd new-site && mkdir uat
. - Set up the default
log
andsilverstripe-cache
directories within your site:cd uat && mkdir log && mkdir silverstripe-cache
. - Add the correct permissions to these new directories:
chown -Rf apache:www-pub silverstripe-cache && chown -Rf apache:www-pub log
. - Add an
assets
directory and set the permissions:chown -Rf apache:www-pub assets
sudo chmod 777 assets
- Go to Rackspace Cloud or Cloudflare depending on the sites requirements to set up the domain (see the Domain set up page to learn how to do this).
- Now we want to create a
vhost
for the site:cd /etc/httpd/vhost.d
and then copy a nonssl
file renaming it to be your new site. - Update the contents of the new
vhost
with the directory paths, domain etc. for your new site. - Test everything is okay at this point using
apachectl configtest
. - Add your new site to DeployHQ (see the DeployHQ page in the docs to learn how to do this).
- Now we want to add the key to the server:
cd /home/centos/.ssh
and thennano authorized_keys
tobe able to paste in your key after the last line. - Add a database to the server for the site which we can then add to the
.env
within DeployHQ config files. - Now we want to reload the server to make sure all our changes take effect:
sudo service httpd reload
. - In the route of you new site, run
certbot
and choose the number for your site to create an SSL. If all works, it should autogenerate an SSL for the site. - Finally, to add directory security to the site, run
htpasswd -c .htpasswd 7dots
and type in our default password.