SMF - Just Installed!
IcUnprotect.cmd -vc hostname_or_IP_address -uid user_ID -password password [-clusterId cluster_ID] [-includeFolders]echo 1 > /sys/block/sdd/device/rescanparted /dev/sde/ print free
parted /dev/sde unit MB print freeparted /dev/sde resizepart 3 6441MBparted /dev/sde print free
pvdisplaypvresize /dev/sde3lvscan
lvextend /dev/vg/root -l +100%FREE -rftpasswd --passwd --file=/etc/proftpd/ftpd.passwd --name=site1.local --uid=33 --gid=33 --home=/var/www/$TMP_SITE --shell=/usr/sbin/nologinmysql -uroot -p CREATE DATABASE site1 DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8mb4_general_ci; GRANT ALL PRIVILEGES ON site1.* TO dbuser@localhost IDENTIFIED BY 'password' WITH GRANT OPTION; quitTMP_SITE=site1.localnano /etc/nginx/sites-enabled/$TMP_SITE.confserver {
listen 80;
server_name site1.local www.site1.local;
set $root_path /var/www/site1.local/www;
access_log /var/www/site1.local/log/nginx/access_log;
error_log /var/www/site1.local/log/nginx/error_log;
gzip on;
gzip_disable "msie6";
gzip_min_length 1000;
gzip_vary on;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
root $root_path;
index index.php index.html index.htm;
location / {
proxy_pass http://127.0.0.1:8080/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~* ^.+\.(jpg|jpeg|gif|png|css|zip|tgz|gz|rar|bz2|doc|docx|xls|xlsx|exe|pdf|ppt|tar|wav|bmp|rtf|js)$ {
expires modified +1w;
}
}server {
listen 80;
server_name site1.local www.site1.local;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
ssl on;
ssl_certificate /etc/nginx/ssl/cert.pem;
ssl_certificate_key /etc/nginx/ssl/cert.key;
server_name site1.local www.site1.local;
set $root_path /var/www/site1.local/www;
access_log /var/www/site1.local/log/nginx/access_log;
error_log /var/www/site1.local/log/nginx/error_log;
gzip on;
gzip_disable "msie6";
gzip_min_length 1000;
gzip_vary on;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
root $root_path;
index index.php index.html index.htm;
location / {
proxy_pass http://127.0.0.1:8080/;
proxy_redirect off;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~* ^.+\.(jpg|jpeg|gif|png|css|zip|tgz|gz|rar|bz2|doc|docx|xls|xlsx|exe|pdf|ppt|tar|wav|bmp|rtf|js)$ {
expires modified +1w;
}
}nano /etc/apache2/sites-enabled/$TMP_SITE.conf
<VirtualHost *:8080>
Define root_domain site1.local
Define root_path /var/www/site1.local
ServerName ${root_domain}
ServerAlias www.${root_domain}
DocumentRoot ${root_path}/www
ErrorLog ${root_path}/log/apache/error_log
TransferLog ${root_path}/log/apache/access_log
php_admin_value upload_tmp_dir ${root_path}/tmp
php_admin_value doc_root ${root_path}
php_admin_value open_basedir ${root_path}:/usr/local/share/smarty:/usr/local/share/pear
php_admin_value session.save_path 0;0660;${root_path}/tmp
</VirtualHost>mkdir -p /var/www/$TMP_SITE/{www,tmp}mkdir -p /var/www/$TMP_SITE/log/{nginx,apache}nano /var/www/$TMP_SITE/www/index.php<?php echo "<h1>Hello from site1</h1>"; ?>chown -R www-data:www-data /var/www/$TMP_SITEchmod -R 775 /var/www/$TMP_SITEnginx -tapachectl configtestsystemctl reload nginxsystemctl reload apache2
nano /etc/php/8.1/apache2/php.inipost_max_size = 1G
...
upload_max_filesize = 512M
...
short_open_tag = On
...
date.timezone = "Europe/Moscow"PHP_VER=8.1INT=apache2sed -e "s/post_max_size = 8M/post_max_size = 1G/" -i /etc/php/$PHP_VER/$INT/php.inised -e "s/upload_max_filesize = 2M/upload_max_filesize = 512M/" -i /etc/php/$PHP_VER/$INT/php.inised -e "s/short_open_tag = Off/short_open_tag = On/" -i /etc/php/$PHP_VER/$INT/php.inised -e "s/;date.timezone =/date.timezone ='Europe\/Moscow'/" -i /etc/php/$PHP_VER/$INT/php.inicat /etc/php/$PHP_VER/$INT/php.ini | grep -e "^post_max_size\|^upload_max_filesize\|^short_open_tag\|^date.timezone"
INT=fpmsed -e "s/post_max_size = 8M/post_max_size = 1G/" -i /etc/php/$PHP_VER/$INT/php.inised -e "s/upload_max_filesize = 2M/upload_max_filesize = 512M/" -i /etc/php/$PHP_VER/$INT/php.inised -e "s/short_open_tag = Off/short_open_tag = On/" -i /etc/php/$PHP_VER/$INT/php.inised -e "s/;date.timezone =/date.timezone ='Europe\/Moscow'/" -i /etc/php/$PHP_VER/$INT/php.inicat /etc/php/$PHP_VER/$INT/php.ini | grep -e "^post_max_size\|^upload_max_filesize\|^short_open_tag\|^date.timezone"systemctl restart php8.1-fpmsystemctl restart apache2nano /etc/nginx/nginx.confclient_max_body_size 512M;systemctl reload nginxapt install postfix -ynano /etc/postfix/main.cfmyorigin = $mydomain
smtp_generic_maps = hash:/etc/postfix/generic_mapnano /etc/postfix/generic_map@example.org no-reply@example.orgpostmap /etc/postfix/generic_mapsystemctl enable postfixsystemctl restart postfixnano /etc/apache2/mods-available/remoteip.conf<IfModule remoteip_module>
RemoteIPHeader X-Forwarded-For
RemoteIPTrustedProxy 127.0.0.1/8
</IfModule>a2enmod remoteipsystemctl restart apache2nano /etc/nginx/sites-enabled/default location ~ \.php$ {
set $root_path /var/www/html;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $root_path$fastcgi_script_name;
include fastcgi_params;
fastcgi_param DOCUMENT_ROOT $root_path;
} location ~ \.php$ {
proxy_pass http://127.0.0.1:8080;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}nginx -tsystemctl reload nginxapt install apache2 libapache2-mod-phpnano /etc/apache2/ports.confListen 8080
#<IfModule ssl_module>
# Listen 443
#</IfModule>
#<IfModule mod_gnutls.c>
# Listen 443
#</IfModule>nano /etc/apache2/mods-available/dir.conf<IfModule dir_module>
DirectoryIndex index.php index.html ...
</IfModule>nano /etc/apache2/apache2.conf<Directory /var/www/*/www>
AllowOverride All
Options Indexes ExecCGI FollowSymLinks
Require all granted
</Directory><IfModule setenvif_module>
SetEnvIf X-Forwarded-Proto https HTTPS=on
</IfModule>a2dismod mpm_eventa2enmod mpm_preforka2enmod php8.1a2enmod setenvifa2enmod rewritesystemctl enable apache2systemctl restart apache2