Skip to content

Instantly share code, notes, and snippets.

@AlessandroLorenzi
Created July 31, 2022 08:47
Show Gist options
  • Save AlessandroLorenzi/6898b2ec64b7bf4e61a9e422b537605f to your computer and use it in GitHub Desktop.
Save AlessandroLorenzi/6898b2ec64b7bf4e61a9e422b537605f to your computer and use it in GitHub Desktop.
Nginx friendica configuration
server {
listen 80;
listen [::]:80;
server_name lorenzi.one;
root /srv/friendica;
index index.php;
access_log /var/log/nginx/friendica.access.log;
error_log /var/log/nginx/friendica.error.log;
client_max_body_size 100M;
autoindex off;
location / {
index index.html index.php index.htm;
try_files $uri /index.php?pagename=$uri&$args;
if (!-f $request_filename) {
rewrite ^/(.+)$ /index.php?pagename=$1 last;
}
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
include fastcgi_params;
fastcgi_intercept_errors on;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment