...
Code Block |
---|
$ sudo -u postgres psql -c "create database webclient;" $ sudo -u postgres psql -c "create user webclient;" $ sudo -u postgres psql -c "alter user webclient with encrypted password 'webclient';" $ sudo -u postgres psql -c "grant all privileges on database webclient to webclient;" |
For Postgres 15 and newer here are additional steps:
Code Block |
---|
GRANT ALL PRIVILEGES ON DATABASE webclient TO webclient;
\c webclient postgres
# You are now connected to database "webclient" as user "postgres".
GRANT ALL ON SCHEMA public TO webclient; |
Install nginx
Code Block |
---|
$ sudo apt-get install nginx |
Insert or change the location section of the Make sure you have the following in your ngnix.conf file
Code Block |
---|
index index.php index.html index.htm
location / {
set $a "";
if ($uri = "/") {
set $a 1;
}
if (-f /var/www/html/init/index.php) {
set $a 1$a;
}
if (!-f /var/www/html/api/conf.d/config.php) {
set $a 1$a;
}
if ($a = 111) {
rewrite ^(.*)$ /init/index.php last;
}
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
location = /api/conf.d/admin_channel.json {
deny all;
return 404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
} |
...