-
Notifications
You must be signed in to change notification settings - Fork 27
Nginx configuration
Sunny Ripert edited this page May 24, 2020
·
1 revision
Example configuration for an Nginx install on Ubuntu:
apt install -y nginx php-fpm
vim /etc/nginx/sites-available/edit.sunfox.org
server {
listen 80;
server_name edit.sunfox.org;
root /var/www/edit.sunfox.org;
index index.html index.htm index.php;
try_files $uri $uri/ @rewrites;
location @rewrites {
rewrite ^ /index.php last;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
location ~ /\. {
access_log off;
log_not_found off;
deny all;
}
location = /favicon.ico {
access_log off;
log_not_found off;
}
}
ln -s /etc/nginx/sites-available/edit.sunfox.org /etc/nginx/sites-enabled/
nginx -t && systemctl reload nginx
mkdir /var/www/
git clone https://github.com/sunny/edith
mv edith edit.sunfox.org