server {
listen 80;
server_name crm3.myportal24.ru www.crm3.myportal24.ru;
return 301 https://crm3.myportal24.ru$request_uri;
#return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
ssi on;
server_name crm3.myportal24.ru;
charset off;
#disable_symlinks if_not_owner from=$root_path;
index index.php index.html;
fastcgi_read_timeout 600;
root /var/www/b24original/data/www;
set $php_sock unix:/run/php/php8.2-fpm.sock;
ssl_stapling on;
ssl_stapling_verify on;
ssl_certificate /etc/letsencrypt/live/crm3.myportal24.ru/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/crm3.myportal24.ru/privkey.pem;
ssl_dhparam /etc/nginx/dhparam.pem;
ssl_session_tickets off;
ssl_session_timeout 3600;
ssl_session_cache shared:SSL:50m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_ciphers 'ECDHE-....тут-много-кодов-поэтому-урезал для тостера-:!DSS';
ssl_prefer_server_ciphers on;
add_header Strict-Transport-Security max-age=31536000;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options nosniff;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
client_max_body_size 1024M;
client_body_buffer_size 4M;
#Посылаем 403 на встроенные в урле goto на другие сайты.
if ($request_uri ~* "goto=") {
return 403;
}
##########################################################
location ~ /.git { deny all; }
location / {
try_files $uri $uri/ @bitrix;
rewrite ^([^.]*[^/])$ $1/ permanent;
}
location ~* /upload/.*\.(php|phtml|pl|asp|aspx|cgi|dll|exe|shtm|shtml|fcg|fcgi|fpl|asmx|pht|py|psp|rb|var)$ {
types {
text/plain text/plain php phtml pl asp aspx cgi dll exe ico shtm shtml fcg fcgi fpl asmx pht py psp rb var;
}
}
location ~ \.php$ {
try_files $uri @bitrix;
fastcgi_pass $php_sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location @bitrix {
fastcgi_pass $php_sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/bitrix/urlrewrite.php;
}
location ~* /bitrix/admin.+\.php$ {
try_files $uri @bitrixadm;
fastcgi_pass $php_sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location @bitrixadm{
fastcgi_pass $php_sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/bitrix/admin/404.php;
#fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f wm@test.ru";
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
#
# block this locations for any installation
#
# ht(passwd|access)
location ~* /\.ht { deny all; }
# repositories
location ~* /\.(svn|hg|git) { deny all; }
# bitrix internal locations
location ~* ^/bitrix/(modules|local_cache|stack_cache|managed_cache|php_interface) {
deny all;
}
# upload files
location ~* ^/upload/1c_[^/]+/ { deny all; }
# use the file system to access files outside the site (cache)
location ~* /\.\./ { deny all; }
location ~* ^/bitrix/html_pages/\.config\.php { deny all; }
location ~* ^/bitrix/html_pages/\.enabled { deny all; }
# Intenal locations
location ^~ /upload/support/not_image { internal; }
# Cache location: composite and general site
location ~* @.*\.html$ {
internal;
# disable browser cache, php manage file
add_header X-Bitrix-Composite "Nginx (file)";
expires 1M;
#fastcgi_hide_header Set-Cookie;
}
# Player options, disable no-sniff
location ~* ^/bitrix/components/bitrix/player/mediaplayer/player$ {
add_header Access-Control-Allow-Origin *;
}
# Accept access for merged css and js
location ~* ^/bitrix/cache/(css/.+\.css|js/.+\.js)$ {
expires 1M;
error_page 404 /404.html;
}
# Disable access for other assets in cache location
location ~* ^/bitrix/cache { deny all; }
# Static content
location ~* ^/(upload|bitrix/images|bitrix/tmp) {
expires 1M;
}
location ~* \.(css|js|gif|png|jpg|jpeg|ico|ogg|ttf|woff|eot|otf|svg)$ {
error_page 404 /404.html;
expires 1M;
#expires off;
}
location = /404.html {
access_log off ;
}
}
webclient_IP_address - - [23/Oct/2024:16:33:10 +0300] "GET /mail/config/new/?id=1&IFRAME=Y&IFRAME_TYPE=SIDE_SLIDER HTTP/1.1" 200 12130 "https://crm3.myportal24.ru/mail/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36"
webclient_IP_address - - [23/Oct/2024:16:33:10 +0300] "POST /bitrix/services/main/ajax.php?action=main.bitrix.main.controller.loadext.getextensions HTTP/1.1" 200 8646 "https://crm3.myportal24.ru/mail/config/new/?id=1&IFRAME=Y&IFRAME_TYPE=SIDE_SLIDER" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36"
webclient_IP_address - - [23/Oct/2024:16:33:10 +0300] "POST /bitrix/services/main/ajax.php?action=main.api.mail.mailproviders.getShowcaseParams HTTP/1.1" 200 1570 "https://crm3.myportal24.ru/mail/config/new/?id=1&IFRAME=Y&IFRAME_TYPE=SIDE_SLIDER" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36"
Нужны ли мне какие-то кабеля для соединения розетки с чем-нибудь ещё или будет достаточно просто поставить её в стену?
После НГ попробую, наверное, создать системд-юнит для lxc-start container_name.