___ # Tags #apache2 #blog #bludit #ubuntu # Helpful docs - [Link to tutorial](https://www.atlantic.net/vps-hosting/how-to-install-bludit-cms-with-nginx-on-ubuntu-20-04/) ## Install the necessary dependencies - Use **sudo** if you are not running as root ```txt apt-get install nginx php php-cli php-fpm php-common php-mbstring php-zip php-pgsql php-sqlite3 php-curl php-gd php-mysql php-intl php-json php-opcache php-xml unzip git curl -y ``` ## We are using nginx so you can get rid of apache2 ```txt apt-get remove apache2 --purge ``` ## Update some php defaults to enable more resource availability - Check versioning to make sure you are editing the right files ```txt nano /etc/php/[CURRENT VERSION]/fpm/php.ini ``` - Edit the following variables to whatever your preferences are ```txt ... memory_limit = 512M ... upload_max_filesize = 50M ... date.timezone = America/Chicago ... ``` - Restart the **php** service after the changes so they go into effect ```txt systemctl restart php[CURRENT VERSION]-fpm ``` ## Grab the bludit cms framework ```txt wget https://www.bludit.com/releases/bludit-[CURRENT VERSION].zip ``` - Unzip the archive ```txt unzip bludit-[CURRENT VERSION].zip ``` - Move it into the root folder for nginx ```txt mv bludit-[CURRENT VERSION] /var/www/html/bludit ``` - Edit the permissions so **bludit** will function properly ```txt chown -R www-data:www-data /var/www/html/bludit ``` ```txt chmod -R 775 /var/www/html/bludit ``` ## Setup nginx to make the website accessible - Create the **bludit.conf** file to put **nginx config** in ```txt nano /etc/nginx/sites-available/bludit.conf ``` - Add the following config to the newly created file - It might be beneficial to create one config for each instance you want to access your site, in my case I want to access both local and on the intranet so I created `bludit.conf` and `bludit-local.conf` the only config change is the public domain and the local dns domain given - Activate both in the next section using the same command but also for **bludit-local.conf** ```txt server { listen 80; server_name zeroedbits.com; root /var/www/html/bludit; index index.php; access_log /var/log/nginx/example.log; error_log /var/log/nginx/example.log; location ~ \.(jpg|jpeg|gif|png|css|js|ico|svg|eot|ttf|woff|woff2|otf)$ { access_log off; expires 30d; } location ~ \.php$ { fastcgi_pass unix:/run/php/php7.2-fpm.sock; fastcgi_index index.php; include fastcgi.conf; } location / { try_files $uri $uri/ /index.php?$args; } location ^~ /bl-content/databases/ { deny all; } location ^~ /bl-content/workspaces/ { deny all; } location ^~ /bl-content/pages/ { deny all; } location ^~ /bl-kernel/*.php { deny all; } } ``` - Activate **nginx's virtual host** ```txt ln -s /etc/nginx/sites-available/bludit.conf /etc/nginx/sites-enabled/ ``` - Restart **nginx** ```txt systemctl restart nginx ``` - You should now be able to access the bludit installer