server {
listen 80;
listen [::]:80;
server_name mydomain.com www.mydomain.com;
return 301 https://mydomain.com$request_uri;
}
server {
# SSL configuration
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate /etc/ssl/certs/cert.pem;
ssl_certificate_key /etc/ssl/private/key.pem;
server_name www.mydomain.com;
return 301 https://mydomain.com$request_uri;
}
server {
# SSL configuration
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate /etc/ssl/certs/cert.pem;
ssl_certificate_key /etc/ssl/private/key.pem;
server_name mydomain.com;
root /var/www/vanilla;
index index.php;
location ~* /\.git { deny all; return 403; }
location /build/ { deny all; return 403; }
location /cache/ { deny all; return 403; }
location /cgi-bin/ { deny all; return 403; }
location /uploads/import/ { deny all; return 403; }
location /conf/ { deny all; return 403; }
location /tests/ { deny all; return 403; }
location /vendor/ { deny all; return 403; }
location ~* ^/index\.php(/|$) {
include snippets/fastcgi-php.conf;
fastcgi_param SCRIPT_NAME /index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root/index.php;
fastcgi_param X_REWRITE 1;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
location ~* \.php(/|$) {
rewrite ^ /index.php$uri last;
}
location / {
try_files $uri $uri/ @vanilla;
}
location @vanilla {
rewrite ^ /index.php$uri last;
}
}
server {
# SSL configuration
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate /etc/ssl/certs/cert.pem;
ssl_certificate_key /etc/ssl/private/key.pem;
server_name mydomain.com www.mydomain.com;
root /var/www/vanilla;
index index.php;
location ~* /\.git { deny all; return 403; }
location /build/ { deny all; return 403; }
location /cache/ { deny all; return 403; }
location /cgi-bin/ { deny all; return 403; }
location /uploads/import/ { deny all; return 403; }
location /conf/ { deny all; return 403; }
location /tests/ { deny all; return 403; }
location /vendor/ { deny all; return 403; }
location ~* ^/index\.php(/|$) {
include snippets/fastcgi-php.conf;
fastcgi_param SCRIPT_NAME /index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root/index.php;
fastcgi_param X_REWRITE 1;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
location ~* \.php(/|$) {
rewrite ^ /index.php$uri last;
}
location / {
try_files $uri $uri/ @vanilla;
}
location @vanilla {
rewrite ^ /index.php$uri last;
}
}
location ~* ^.+\.(jpeg|...|avi|flv|m4v|mkv|...)
^~
nginx.org/ru/docs/http/ngx_http_core_module.html#l...location ^~ /videos/ {
root /home/user/web/mydomain.com/public_html;
limit_conn addr 10;
limit_rate_after 500k;
limit_rate 150k;
}
location ~* ^.+\.(mp4) { }
location ~* /videos/ { }
location ~ \.(mp4|...)
location /soft {
на location ^~ /soft/ {
location ^~ /soft/ {
alias /mnt/fs-soft/;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
dav_access user:rw group:rw all:rw;
dav_methods PUT DELETE MKCOL COPY MOVE;
create_full_put_path on;
client_max_body_size 10G;
}
server {
listen 443 ssl;
server_name www.ustim.ru ustim.ru;
open() "/var/www/ustim.ru/soft/music/vsti/toontrack/ezbass/test.zip" failed
listen 80;
т.е. этот конфиг только для запросов http://
, а https://
попадает блок с listen 443 ssl;
вот этот конфиг и нужно смотреть.