php.mysite.ru/phpmyadmin было php.mysite.ru/ нужно исправить root путь.server {
listen 80;
listen [::]:80;
root /var/www/html/phpmyadmin;
# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;
server_name php.mysite.ru
# pass PHP scripts to FastCGI server
#
location ~ \.php$ {
include snippets/fastcgi-php.conf;
#
# # With php-fpm (or other unix sockets):
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
}
} import re
txt = '''
26. Эта замечательная жизнь (It’s a Wonderful Life) (1946)
Мысли о самоубийстве одолевают в определенные периоды жизни любого че...
27. Однажды на Диком Западе (C’era una volta il West) (1968)
Об этом вестерне Серджио Леоне можно писать долго. Режиссер в очередной раз
'''
m = re.findall(r'(?m)^\d+\.\s*(.*)', txt)
print(m) сайт.ру/q?example=1 было сайт.ру/q/example/1
RewriteCond %{QUERY_STRING} (?:^|&)(example)=(1)(?:$|&)
RewriteRule ^q$ https://site.ru/q/%1/%2? [R=301,L]https://site.ruserver {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name site.ru;
ssl_certificate ... ;
ssl_certificate_key ... ;
} Если у совпавшего префиксного location’а максимальной длины указан модификатор “^~”, то регулярные выражения не проверяются.
location /site2/ добавить ^~location /site1 { добавить location ~* \.php$location /site1 {
root /var/www/site1;
location ~* \.php$ {
try_files $uri = 404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; # подключаем сокет php-fpm
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
location ^~ /site2/ {
proxy_pass https://site2/;
} RewriteCond %{DOCUMENT_ROOT}/files/$1 -f
RewriteRule ^(img/.+) /files/$1 [L] server_name domain.ru;
location /api/ {
root /var/www/site.ru;
rewrite ^ /index.php break;
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
} server {
client_max_body_size 32M;
location /faq/upload {
client_max_body_size 400M;
try_files $uri @admin_upload;
}
location @admin_upload {
rewrite ^ /index.php break;
fastcgi_pass ... ;
include fastcgi_params;
}
location ~ \.php$ {
fastcgi_pass ... ;
include fastcgi_params;
} server
{
...
location ~* ^/build/.*\.(jpg|jpeg|gif|css|png|js|ico|html)$ {
access_log off;
expires max;
log_not_found off;
}
location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
access_log off;
log_not_found off;
}
} RewriteRule ^(.+?)\.html(?!/amp/).+$ https://%{HTTP_HOST}/$1.html? [L,R=301]
RewriteCond %{QUERY_STRING} !^$
RewriteCond %{QUERY_STRING} !(^|&)srp=
RewriteCond %{QUERY_STRING} !(^|&)srk=
RewriteRule ^(.+?)\.html$ https://%{HTTP_HOST}/$1.html? [L,R=301]
RewriteCond %{REQUEST_URI} !^/wp-content/cache/
RewriteRule ^(.+?)\.html(?!/amp/).+$ https://%{HTTP_HOST}/$1.html? [L,R=301] RewriteEngine On
RewriteRule ^old/(\d+)$ https://site.ru/new/$1 [R=301,L]map $arg_arg1 $conf {
default "conf.js";
"4982948394" "conf2.js";
}
server {
location = /conf.js {
alias /config/$conf;
}