Install Azuriom on a VPS
Installation on a VPS
In the case of web hosting, the prerequisites above will certainly already be installed, and you can directly proceed to installing Azuriom.
If you are using a VPS or dedicated server, it will most likely be necessary to install a web server, PHP and MySQL yourself. This can be done, for example, on Debian or Ubuntu with the following commands:
apt update -y && apt upgrade -y
apt install -y nginx mariadb-server zip curl lsb-release apt-transport-https ca-certificates
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list
apt update -y
apt install -y php8.2 php8.2-fpm php8.2-mysql php8.2-pgsql php8.2-sqlite3 php8.2-bcmath php8.2-mbstring php8.2-xml php8.2-curl php8.2-zip php8.2-gd
Now that MySQL (MariaDB) is installed, you can create a database and user with the following commands (remember to replace <password> with a secure password!)
During installation, the database and database user will be azuriom and the password will be the one that replaces <password> in the command above.
Once the prerequisites are installed, you must configure the web server.
Azuriom provides an automatic installer to install Azuriom easily by following these few steps:
- Download the latest version of the Azuriom installer from the official website.
- Extract the archive to the root of your website.
- Set write permissions at the root of the web server, for example with this command:
chmod -R 755 /var/www/azuriom
(simply replacing /var/www/azuriom with the site location)
If the current user is not the same as the web server user, it may be necessary to change the file owner, for example with this command:
chown -R www-data:www-data /var/www/azuriom
(simply replacing /var/www/azuriom with the site location and www-data with the web server user)
4. Go to your site and follow the installation steps.
If you are using Apache2, it may be necessary to enable URL rewriting. To do this, start by enabling the "rewrite" module with the following command:
a2enmod rewrite
Then you can configure the site to allow URL rewriting. Simply modify the Apache2 configuration file (default /etc/apache2/sites-available/000-default.conf) and add the following lines between the <VirtualHost> tags (replacing var/www/azuriom with the site location):
<Directory "/var/www/azuriom">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Finally, apply the changes by restarting Apache2:
service apache2 restart
If you are deploying Azuriom on a server that uses NGINX, you can use the following NGINX configuration for URL rewriting to be considered enabled:
server {
listen 80;
server_name example.com;
root /var/www/azuriom/public;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
add_header Referrer-Policy "strict-origin-when-cross-origin";
index index.html index.htm index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
}
This configuration should be placed in a file in the /etc/nginx/sites-available folder and not in the main nginx.conf configuration file.
Also remember to replace monsupersite.com with your domain, /var/www/azuriom with the site location (without removing the /public from the line) and php8.2 with your PHP version.
Finally, apply the changes by restarting NGINX:
service nginx restart