CMS Installazione · 7 min read · Dec 19, 2025
Come installare Flatpress CMS con SSL Let's Encrypt su Ubuntu 22.04

FlatPress è un sistema di gestione dei contenuti gratuito e open source ed è il più veloce. È scritto in linguaggio PHP ed è un ottimo strumento per chiunque non abbia accesso al database. È un motore di blogging leggero e facile da configurare e ottimo nella categoria social e comunicazioni. Supporta più lingue, plugin, temi, widget e molto altro.
In questo tutorial, spiegherò come installare FlatPress su un server Ubuntu 22.04.
Requisiti
- Un server che esegue Ubuntu 22.04.
- Un utente non root con privilegi sudo.
Installa Apache e PHP
Per impostazione predefinita, PHP 8.1 è la versione PHP predefinita in Ubuntu 22.04. Ma FlatPress supporta solo la versione PHP 8.0. Quindi, dovrai aggiungere il repository PHP al tuo sistema. Puoi aggiungerlo con il seguente comando:
apt install software-properties-common -y
add-apt-repository ppa:ondrej/phpUna volta aggiunto il repository, installa Apache, PHP e tutte le estensioni PHP richieste eseguendo il seguente comando:
apt-get install apache2 php8.0 php8.0-mysql php8.0-curl php8.0-cgi libapache2-mod-php8.0 php8.0-mcrypt php8.0-xmlrpc php8.0-gd php8.0-mbstring php8.0 php8.0-common php8.0-xmlrpc php8.0-soap php8.0-xml php8.0-intl php8.0-cli php8.0-ldap php8.0-zip php8.0-readline php8.0-imap php8.0-tidy php8.0-sql php8.0-intl wget unzip -yDopo aver installato tutti i pacchetti, avvia il servizio Apache e abilitalo per avviarsi all’avvio con il seguente comando:
systemctl start apache2
systemctl enable apache2Una volta terminato, puoi procedere al passaggio successivo.
Installa FlatPress
Per prima cosa, visita il repository Git di FlatPress e scarica l’ultima versione con il seguente comando:
wget https://github.com/flatpressblog/flatpress/archive/1.2.1.zipSuccessivamente, estrai il file scaricato con il seguente comando:
unzip 1.2.1.zipSuccessivamente, copia la directory estratta nella directory radice di Apache e dai i permessi appropriati con il seguente comando:
cp -r flatpress-1.2.1 /var/www/html/flatpresschown -R www-data.www-data /var/www/html/flatpress
chmod -R 775 /var/www/html/flatpressConfigura Apache per FlatPress
Successivamente, dovrai creare un file di host virtuale Apache per FlatPress. Puoi crearlo con il seguente comando:
nano /etc/apache2/sites-available/flatpress.confAggiungi le seguenti righe:
ServerAdmin [email protected]
DocumentRoot /var/www/html/flatpress
ServerName flatpress.example.com
AllowOverride All
Require all granted
ErrorLog ${APACHE_LOG_DIR}/flatpress_error.log
CustomLog ${APACHE_LOG_DIR}/flatpress_access.log combined
Salva e chiudi il file. Quindi, abilita l’host virtuale con il seguente comando:
a2ensite flatpressSuccessivamente, abilita il modulo di riscrittura di Apache e ricarica il servizio Apache con il seguente comando:
a2enmod rewrite
systemctl restart apache2Puoi anche controllare lo stato di Apache con il seguente comando:
systemctl status apache2Dovresti vedere il seguente output:
? apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2022-11-20 11:37:30 UTC; 6s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 100768 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Main PID: 100772 (apache2)
Tasks: 6 (limit: 2242)
Memory: 14.3M
CPU: 85ms
CGroup: /system.slice/apache2.service
??100772 /usr/sbin/apache2 -k start
??100773 /usr/sbin/apache2 -k start
??100774 /usr/sbin/apache2 -k start
??100775 /usr/sbin/apache2 -k start
??100776 /usr/sbin/apache2 -k start
??100777 /usr/sbin/apache2 -k start
Nov 20 11:37:30 ubuntu2204 systemd[1]: Starting The Apache HTTP Server...
Una volta terminato, puoi procedere al passaggio successivo.
Sicurezza di FlatPress con SSL Let’s Encrypt
È una buona idea proteggere il tuo sito FlatPress con un certificato SSL Let’s Encrypt. Per farlo, dovrai installare il client Certbot nel tuo sistema. Certbot è un pacchetto client che ti aiuta a scaricare e gestire i certificati SSL sul tuo sito web.
Puoi installare Certbot con il seguente comando:
apt-get install certbot python3-certbot-apache -yUna volta installato correttamente il client Certbot, esegui il seguente comando per installare l’SSL Let’s Encrypt per il tuo sito web:
certbot --apache -d flatpress.example.comTi verrà chiesto di fornire la tua email valida e accettare i termini di servizio come mostrato di seguito:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): [email protected]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for flatpress.example.com
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/flatpress-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/flatpress-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/flatpress-le-ssl.conf
Successivamente, seleziona se reindirizzare o meno il traffico HTTP a HTTPS o configurare Nginx per reindirizzare tutto il traffico a un accesso HTTPS sicuro come mostrato nel seguente output:
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Digita 2 e premi Invio per avviare il processo. Una volta completata l’installazione, dovresti ottenere il seguente output:
Enabled Apache rewrite module
Redirecting vhost in /etc/apache2/sites-enabled/flatpress.conf to ssl vhost in /etc/apache2/sites-available/flatpress-le-ssl.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://flatpress.example.com
You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=flatpress.example.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/flatpress.example.com/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/flatpress.example.com/privkey.pem
Your cert will expire on 2023-02-20. To obtain a new or tweaked
version of this certificate in the future, simply run certbot again
with the "certonly" option. To non-interactively renew *all* of
your certificates, run "certbot renew"
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le
A questo punto, il tuo sito FlatPress è protetto con SSL Let’s Encrypt. Puoi ora accedere al tuo sito in modo sicuro utilizzando il protocollo HTTPS.
Accedi a FlatPress CMS
Ora, apri il tuo browser web e digita l’URL https://flatpress.example.com. Sarai reindirizzato alla pagina di installazione di FlatPress:

Ora, fai clic sul pulsante Avanti. Dovresti vedere la pagina di creazione dell’utente Admin:

Qui, fornisci il tuo nome utente admin, password, email e fai clic sul pulsante Avanti. Dovresti vedere la seguente pagina:

Fai clic sul pulsante Accedi ora. Dovresti vedere la seguente pagina:

Fornisci il tuo nome utente admin, password e fai clic sul pulsante Login. Dovresti vedere la seguente pagina:

Conclusione
Questo tutorial ha spiegato come installare FlatPress con Apache e SSL Let’s Encrypt su Ubuntu 22.04. Ora puoi creare un sito web e un blog semplici e veloci utilizzando il CMS FlatPress. Sentiti libero di chiedermi se hai domande.
Ricevi i nuovi post nella tua casella di posta.
Nessuno spam. Disiscriviti in qualsiasi momento.