map $http_referer $index {
default $uri;
'~http://google.ru/apps/' '/apps/index.html';
}
try_files $index $uri $uri/ /index.html;
server {
listen 80;
listen 443 ssl http2;
ssl_certificate /cert.crt;
ssl_certificate_key /key.key;
server_name www.example.com;
return 301 https://example.com$request_uri;
}
server {
listen 80;
listen 443 ssl http2;
ssl_certificate /cert.crt;
ssl_certificate_key /key.key;
server_name example.com;
index index.html index.htm index.php index.cgi index.pl index.xhtml;
location ~ /\. { internal; }
location / { rewrite ^([^.\?]*[^/])$ $1/ permanent; }
location /odminka/ { }
location /guide { }
try_files $uri $uri/ /index.php/$uri;
location ~ \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
}
}
logoutput: /var/log/danted.log
# IP или имя и порт "внутреннего" интерфейса
internal: 1.2.3.4 port = 1080
# IP "внешнего" интерфейса
# Скорее всего, он будет точно таким же
external: 1.2.3.4
socksmethod: username
clientmethod: none
user.privileged: root
user.notprivileged: nobody
user.libwrap: nobody
# На первой стадии соединения всем всё можно
client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
}
Ну или фиг с ним с dd. Какая есть программа под Debian, чтобы можно было выбрать «MBR или GPT»?
mysql -uroot -p
create database bitrixbd;
create user bitrixuser@localhost identified by 'password';
grant all privileges on bitrixbd.* to bitrixuser@localhost identified by 'password';
flush privileges;
exit;
location ~* ^.+\.(svg|svgz|ttf|jpg|jpeg|gif|png|ico|webp)$ {
try_files $uri @prod;
access_log off;
expires 8d;
}
location @prod {
proxy_pass http://prod.ru;
}
server {
listen 127.0.0.1:80;
...
}
server {
listen 80;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
...
}
server {
listen 80;
listen 443 ssl;
set $https "0";
if ($scheme != "https") { set $https "A"; }
if ($remote_addr != "127.0.0.1") { set $https "${https}B"; }
if ($https = "AB") { rewrite ^ https://$http_host$request_uri? permanent; }
...
}
map "$scheme:$remote_addr" $https {
"https:*" 0;
"http:127.0.0.1" 0;
default 1;
}
server {
listen 80;
listen 443 ssl;
if ($https) { rewrite ^ https://$http_host$request_uri? permanent; }
...
}
server {
listen 127.0.0.1:80;
include vhost.conf;
}
server {
listen 80;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
include vhost.conf;
}