Static Pages

Install FlatPress with NGINX/ Debian 12


$ sudo mkdir -p /var/www/html/domain
$ wget https://github.com/flatpressblog/flatpress/archive/1.3.1.zip
$ unzip flatpress-1.3.1.zip
$ mv flatpress-1.3.1/* /var/www/html/domain
$ chown -R www-data:www-data /var/www/html/domain
$ chmod -R 775 /var/www/html/domain
$ nano /etc/nginx/conf.d/domain.conf

server {
        listen 80;
        server_name domain.com;
        root /var/www/html/domain;
        index index.php index.html index.htm;
        error_log /var/log/nginx/domain_error.log;
        access_log /var/log/nginx/domain_access.log;
        client_max_body_size 100M;
        location / {
                try_files $uri $uri/ /index.php?$args;
        }
        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/run/php/php8.2-fpm.sock;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        }
}

$ nginx -t
$ systemctl reload nginx
http://domain1.com