# fresh install ## Install required apps ``` apt install git composer php8.1-curl -y ``` ## Set-Up the SSL folder to keep things together ``` mkdir /etc/nginx/ssl/ ``` - Now That you have the directory created, copy the `.key` and `.pem` files into the newly made ssl folder on the server. - You will then need to modify the filer ownership and permissions ``` chmod -R 655 /etc/nginx/ssl chown -R www-data:www-data /etc/nginx/ssl ``` ## Add configs for the site - First, copy `ttp.conf` into the `/etc/nginx/snippets/` folder. - Next, copy the `tabletopelite.com.conf` file into the `/etc/nginx/sites-available/` folder. - The next block will acomplish a few things: backup the old config, enable the new config, disable the old config, and restart the server. ``` mkdir /etc/nginx/sites-available/old/ sudo mv /etc/nginx/sites-available/* /etc/nginx/sites-available/old/ sudo ln -s /etc/nginx/sites-available/tabletopelite.com.conf /etc/nginx/sites-enabled/tabletopelite.com.conf sudo rm -rf /etc/nginx/sites-enabled/* sudo systemctl restart nginx.service ``` ## Set-Up the files ``` cd /var/www/ git config --global credential.helper store git clone https://git.thetempusproject.com/tabletopelite/tabletopelite.com.git tabletopelite.com git fetch git checkout production ``` _You will be prompted for git creds, use the creds shared below_ ``` git config --global --add safe.directory /var/www/tabletopelite.com git config --global --add safe.directory /var/www/tabletopelite.com/vendor/tabletopelite/hermes git config --global user.name "Production Server" git config --global user.email webmaster@tabletopelite.com cd tabletopelite.com composer install chmod -R 777 . chown -R www-data:www-data . ``` #### GitLab Credentials: User: `root`\ Password: `rdFtVPhzlu6u6orxN4NAsbgAE4AyqZPTXPXQTleyA5I=` #### Logging ``` tail -f /var/log/nginx/*.log ```