You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
server {
listen 80;
listen [::]:80;
server_name wapinet.ru www.wapinet.ru;return 301 https://$server_name$request_uri;
}
server {
if ($request_uri~"/forum/(.*)") {
return 301 https://forum.$server_name/$1;
}
location ~ /\. {
deny all;
}
ssl_protocols TLSv1.2 TLSv1.3;
acme wapinet_acme_client;
ssl_certificate $acme_cert_wapinet_acme_client;
ssl_certificate_key $acme_cert_key_wapinet_acme_client;
ssl_session_timeout 1h;
ssl_session_cache shared:SSL:10m;
charset utf-8;
listen 443 ssl;
listen [::]:443 ssl;
http2 on;
client_max_body_size 50m;
server_name wapinet.ru www.wapinet.ru;
root /var/www/wapinet/public;
error_log /var/log/angie/wapinet.error.log;
access_log /var/log/angie/wapinet.access.log;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
add_header X-Frame-Options "DENY";
add_header X-Content-Type-Options nosniff;# Кэширование
location = /favicon.ico {
access_log off;
expires 30d;
}
location = /robots.txt {
access_log off;
expires 30d;
}
location = /apple-touch-icon.png {
access_log off;
expires 30d;
}
location /bundles/ {
access_log off;
expires 30d;
}
location /build/ {
access_log off;
expires 30d;
}
location /media/ {
access_log off;
expires 30d;
try_files $uri /index.php$is_args$args;
}
location ~ ^/static/ {
# Скачивание всех файлов (в т.ч. и txt, html и проч. в обменнике), чтобы потенциальный html/js код не выполнился в браузере
add_header Content-Disposition "attachment";
access_log off;
expires 30d;
}
location / {
# try to serve file directly, fallback to index.php
try_files $uri /index.php$is_args$args;
}
location ~ ^/index\.php(/|$) {
limit_conn perip 15;
limit_req zone=php_requests burst=20 nodelay;
limit_req_status 429;
fastcgi_pass unix:/run/php/php8.5-fpm.sock;
fastcgi_split_path_info ^(.+
}\.php)(/.*)$;
include fastcgi_params;# When you are using symlinks to link the document root to the# current version of your application, you should pass the real# application path instead of the path to the symlink to PHP# FPM.# Otherwise, PHP OPcache may not properly detect changes to# your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126# for more information).
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;# Prevents URIs that include the front controller. This will 404:# http://domain.tld/index.php/some-path# Remove the internal directive to allow URIs like this
internal;
}
#location ~ \.php$ {# return 404;#}
}' > /etc/angie/http.d/wapinet.ru.conf
СУБД
mysql -u root -p
CREATE USER 'wapinet'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON wapinet.* TO 'wapinet'@'localhost';
GRANT SELECT ON forum.* TO 'wapinet'@'localhost';
quit
mysql -u wapinet -p wapinet < wapinet.sql