Директива
location / {
try_files $uri $uri/ /index.php?$query_string;
}
Конфигурация nginx
server {
server_name funy44.com www.funy44.com;
charset UTF-8;
disable_symlinks if_not_owner from=$root_path;
include /etc/nginx/vhosts-includes/*.conf;
include /etc/nginx/vhosts-resources/funy4.com/*.conf;
access_log /var/www/httpd-logs/funy44.com.access.log;
error_log /var/www/httpd-logs/funy44.com.error.log notice;
ssi on;
return 301 https://$host:443$request_uri;
set $root_path /var/www/funy44/data/www/funy44.com;
root $root_path;
location / {
location ~ [^/]\.ph(p\d*|tml)$ {
try_files /does_not_exists @php;
}
}
location @php {
fastcgi_index index.php;
fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f admin@funy44.com";
fastcgi_pass unix:/var/www/php-fpm/funy44.sock;
fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
try_files $uri =404;
include fastcgi_params;
}
index index.php index.html;
listen 19.112.12.170:80;
}
server {
server_name funy44.com www.funy44.com;
ssl_certificate "/var/www/httpd-cert/funy44/funy44.com_le2.crt";
ssl_certificate_key "/var/www/httpd-cert/funy44/fun44.com_le2.key";
ssl_ciphers EECDH:+AES256:-3DES:RSA+AES:!NULL:!RC4;
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
add_header Strict-Transport-Security "max-age=31536000;";
ssl_dhparam /etc/ssl/certs/dhparam4096.pem;
charset UTF-8;
disable_symlinks if_not_owner from=$root_path;
include /etc/nginx/vhosts-includes/*.conf;
include /etc/nginx/vhosts-resources/funy44.com/*.conf;
access_log /var/www/httpd-logs/funy44.com.access.log;
error_log /var/www/httpd-logs/funy44.com.error.log notice;
ssi on;
set $root_path /var/www/funyo44/data/www/funy44.com;
root $root_path;
location / {
location ~ [^/]\.ph(p\d*|tml)$ {
try_files /does_not_exists @php;
}
}
location @php {
fastcgi_index index.php;
fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f admin@funy44.com";
fastcgi_pass unix:/var/www/php-fpm/funy44.sock;
fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
try_files $uri =404;
include fastcgi_params;
}
index index.php index.html;
listen 19.112.12.170:443 ssl http2;
}