Connect to psql:
su - postgres database_name
psql
- To create a new user in PostgreSQL:
CREATE USER username WITH PASSWORD 'your_password';
Connect to psql:
su - postgres database_name
psql
CREATE USER username WITH PASSWORD 'your_password';
sudo apt-get install supervisor
Supervisor configuration files typically live in a /etc/supervisor/conf.d directory. For example, you can create a new messenger-worker.conf file there to make sure that 2 instances of messenger:consume are running at all times:
;/etc/supervisor/conf.d/messenger-worker.conf
[program:messenger-consume]
command=php /path/to/your/app/bin/console messenger:consume async --time-limit=3600
user=ubuntu
numprocs=2
startsecs=0
If you want to copy a directory from machine a to b while logged into a:
scp -r /path/to/directory user@ipaddress:/path/to/destination
If you want to copy a directory from machine a to b while logged into b:
scp -r user@ipaddress:/path/to/directory /path/to/destination
https://devanswers.co/configure-sftp-web-server-document-root/
SFTP stands for SSH File Transfer Protocol. As its name suggests, it’s a secure way of transferring files to a server using an encrypted SSH connection. Despite the name, it’s a completely different protocol than FTP (File Transfer Protocol), though it’s widely supported by modern FTP clients. SFTP is available by default with no additional configuration on all servers that have SSH access enabled. It’s secure and easy to use, but comes with a disadvantage: in a standard configuration, the SSH server grants file transfer access and terminal shell access to all users with an account on the system. In some cases, you might want only certain users to be allowed file transfers and no SSH access. In this tutorial, we’ll set up the SSH daemon to limit SFTP access to one directory with no SSH access allowed on per user basis.
When you first create a new server, there are a few configuration steps that you should take early on as part of the basic setup. This will increase the security and usability of your server and will give you a solid foundation for subsequent actions.
adduser demo
passwd demo
Now, we have a new user account with regular account privileges. However, we may sometimes need to do administrative tasks. To avoid having to log out of our normal user and log back in as the root account, we can set up what is known as “super user” or root privileges for our normal account. This will allow our normal user to run commands with administrative privilege
yum update
The PostgreSQL Yum Repository will integrate with your normal systems and patch management, and provide automatic updates for all supported versions of PostgreSQL throughout the support lifetime of PostgreSQL.
CentOS 8:
sudo yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
# Nginx configuration
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name ${NGINX_HOST};
root /var/www/html/backend/public;
access_log /var/log/nginx/access_log.log;
sudo yum install epel-release
sudo yum install nginx
sudo systemctl start nginx
sudo systemctl enable nginx
/etc/nginx/sites-available
and /etc/nginx/sites-enabled
directories. If you want to use the directory rather than cond.d
, you have to make them manually. Typically, the sites-enabled folder is used for virtual host definitions, while conf.d is used for global server configuration. Also, don’t forget to include the “enabled” directry to the root configuration. In other words, you’ll need the following line in the “http” block in “/etc/nginx/nginx.conf”: `in.recaptcha_response
elements on page ant refresh them every 2min<script src="https://www.google.com/recaptcha/api.js?render=YOUR_RECAPTCHA_SITE_KEY"></script>
<script>
$(document).ready(function () {
var elements = document.getElementsByClassName('recaptcha_response');
if (elements) {
grecaptcha.ready(function () {
grecaptcha_execute(elements);
/usr/local/vesta/data/templates/web/