From 9f8722c75ee5338424db29eae8525c2e8add2438 Mon Sep 17 00:00:00 2001 From: kosenka Date: Tue, 8 Apr 2025 14:21:41 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20hestiacp=5Finstall?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hestiacp_install | 76 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/hestiacp_install b/hestiacp_install index 22534c8..405991e 100644 --- a/hestiacp_install +++ b/hestiacp_install @@ -67,6 +67,10 @@ save and exit # v-change-web-domain-backend-tpl $USERNAME $DOMAIN $TEMPLATE +get password for Postgres +# grep -Eo "PASSWORD='[a-zA-Z0-9]+'" /usr/local/hestia/conf/pgsql.conf | awk -F "PASSWORD=" '{print $2}' | awk -F "'" '{print $2}' + + *** relogin as $USERNAME # cd /home/$USERNAME/web/$DOMAIN/public_html/ @@ -76,8 +80,80 @@ save and exit # php composer.phar install # touch /home/$USERNAME/web/$DOMAIN/public_html/config/params-local.php +# touch /home/$USERNAME/web/$DOMAIN/public_html/config/dbEIS.php + Connection::class, + 'dsn' => 'pgsql:host=localhost;dbname=$DB_NAME', + 'username' => '$DB_USER', + 'password' => '$DB_PASSWORD', + 'schemaMap' => [ + 'pgsql' => [ + 'class' => Schema::class, + 'defaultSchema' => 'public', //specify your schema here, public is the default schema + ], + ], + // Schema cache options (for production environment) + 'enableSchemaCache' => !YII_DEBUG, + 'schemaCacheDuration' => 3600, + 'schemaCache' => 'cache', + 'enableQueryCache' => true, + 'queryCacheDuration' => 3600, +]; + +# touch /home/$USERNAME/web/$DOMAIN/public_html/config/dbPG.php + Connection::class, + 'dsn' => 'pgsql:host=localhost;dbname=$DB_NAME', + 'username' => '$DB_USER', + 'password' => '$DB_PASSWORD', + 'schemaMap' => [ + 'pgsql' => [ + 'class' => Schema::class, + 'defaultSchema' => 'public', //specify your schema here, public is the default schema + ], + ], + // Schema cache options (for production environment) + 'enableSchemaCache' => !YII_DEBUG, + 'schemaCacheDuration' => 3600, + 'schemaCache' => 'cache', + 'enableQueryCache' => true, + 'queryCacheDuration' => 3600, +]; # sudo su - # v-change-web-domain-docroot $USERNAME $DOMAIN $DOMAIN web + +# touch /home/admin/conf/web/$DOMAIN/nginx.ssl.conf_my +# mcedit /home/admin/conf/web/$DOMAIN/nginx.ssl.conf_my +location ~* ^.+\.(pdf|doc|docx|xls|xlsx|ppt|pptx)$ { + proxy_pass https://$IP_ADDRESS:8443; + add_header Last-Modified ""; + add_header Cache-Control 'no-store, no-cache'; + if_modified_since off; + expires off; + etag off; + try_files $uri @fallback; +} + +add_header X-Frame-Options SAMEORIGIN; +add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"; +add_header X-Content-Type-Options nosniff; +add_header Referrer-Policy "no-referrer-when-downgrade"; +add_header X-XSS-Protection "1; mode=block"; +add_header Permissions-Policy "geolocation=(),midi=(),microphone=(),camera=(),magnetometer=(),gyroscope=(),fullscreen=*,payment=()"; +add_header Content-Secutiry-Policy "upgrade-insecure-requests"; + +save and exit + # exit