Created
July 31, 2022 08:47
-
-
Save AlessandroLorenzi/6898b2ec64b7bf4e61a9e422b537605f to your computer and use it in GitHub Desktop.
Nginx friendica configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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