• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Input NGINX-Configuration for Drupal 8.X without Apache for Plesk Obsidian | Ubuntu 18.X

Jürgen_T

Regular Pleskian
Usually the combination of NGINX as Proxy for Apache works fine for Drupal 8 in Plesk but for those who would like to use NGINX solo you will find this recipe on www.nginx.com: Drupal | NGINX But this does unfortunately not work without modifications for Plesk managed server.

You need some modifications as mentioned below. You can use the following configuration for NGINX in Plesk - which works fine in my case. Applying this you must just take care of

fastcgi_pass unix:/var/run/plesk/plesk-php74-fpm.sock;

This works for me as I use php 7.4 but depends on your configuration concerning php.


#NGINX configuration start
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_static on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types application/javascript application/rss+xml application/vnd.ms-fontobject application/x-font application/x-font-opentype application/x-font-otf application/x-font-truetype application/x-font-ttf application/x-javascript application/xhtml+xml application/xml font/opentype font/otf font/ttf image/svg+xml image/x-icon text/css text/javascript text/plain text/xml;

location ~ / {
index index.php index.cgi index.pl index.html index.xhtml index.htm index.shtml;
try_files $uri $uri/ /index.php$is_args$args;
}

location ~ \..*/.*\.php$ {
return 403;
}

location ~ ^/sites/.*/private/ {
return 403;
}

location ~ ^/sites/[^/]+/files/.*\.php$ {
deny all;
}

location ~* ^/.well-known/ {
allow all;
}

location ~ (^|/)\. {
return 403;
}

location @rewrite {
rewrite ^/(.*)$ /index.php?q=$1;
}

location ~ /vendor/.*\.php$ {
deny all;
return 404;
}

location ~ '\.php$|^/update.php' {
fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
include fastcgi_params;
fastcgi_param HTTP_PROXY "";
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param QUERY_STRING $query_string;
fastcgi_intercept_errors on;
fastcgi_pass unix:/var/run/plesk/plesk-php74-fpm.sock; #(depends on your configuration)
}

location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}

location ~ ^(/[a-z\-]+)?/system/files/ {
try_files $uri /index.php?$query_string;
}

location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
try_files $uri @rewrite;
expires max;
log_not_found off;
}

if ($request_uri ~* "^(.*/)index\.php(.*)") {
return 307 $1$2;
}
#NGINX configuration end


Please find following the additional settings for plesk
1581590151430.png



I hope, this recipe saves time. In case there are proposals for modifications I would be glad to hear it and to optimize my recipe further.
 
Thank you IgorG, I have transfered it as proposed. As it is my first contribution to your ressources please feel free to tell me If my post there is ok as it is?
 
Thank you IgorG, I have transfered it as proposed. As it is my first contribution to your ressources please feel free to tell me If my post there is ok as it is?
I'd suggest you to use CODE for better code formatting. I mean something like that :

Code:
Code text here
 
Back
Top