• 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!
  • 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.

Question nginx - adding app.php to directoryIndex

Just use custom vhost template:

1. Create directory:

# mkdir -p /usr/local/psa/admin/conf/templates/custom/domain

2. Copy template:

# cp /usr/local/psa/admin/conf/templates/default/domain/nginxDomainVirtualHost.php /usr/local/psa/admin/conf/templates/custom/domain/

3. Edit custom template:

# vi /usr/local/psa/admin/conf/templates/custom/domain/nginxDomainVirtualHost.php

Change line

Code:
location ~ /$ {
        <?php echo $VAR->domain->physicalHosting->proxySettings['directoryIndex'] ?>
    }

to:

Code:
location ~ / {
     index index.php index.html app.php;
     try_files $uri $uri/ /index.php?$args;
 }

4. Tell Plesk to rebuild the NGINX conf files for the domains on the server:

# /usr/local/psa/admin/bin/httpdmng --reconfigure-all

5. Enable PHP Settings for domain as "FPM application served by nginx"

6. Open http://domain.com/ where app.php is index page.
 
Hi, thanks for that!

I did the exact same thing a while back and I was getting "file not found" messages on nginix websites, had to move them to apache, then I reverted back to the original file and all works fine... :(
 
Hi octet,

I did the exact same thing a while back and I was getting "file not found" messages on nginix websites
Pls. be aware, that some content use ".htaccess" - files, which can't be read by NGINX. In such cases, you have to convert these ".htaccess" - files, when you use NGINX and add the ( additional ) NGINX directives at for example "Home > Subscriptions > YOUR-DOMAIN.COM > Apache & nginx Settings" ( textbox for: Additional nginx directives ).

Plesk offers as well a wonderfull tool called "htaccess to nginx" - converter. You find this ( free ) Plesk - extension at the "Extension catalog" ( "Home > Extensions > Extensions Catalog" ), or at => htaccess to nginx over ext.plesk.com


Pls. note as well, that it really helps to investigate issues/errors/problems, when you include depending log - file - entries AND the corresponding webserver - configuration files for the (sub)domain, located at: "/var/www/vhosts/system/(SUB-DOMAIN.)YOUR-DOMAIN.COM/conf/". We can't guess possible misconfigurations and therefore we can't answer questions without these essential informations. :(
 
Hi guys,

I've the same problem and I've installed the htaccess to nginx extension but now i have this error:

[emerg] unknown directive "setenv" in /var/www/vhosts/system/mydomanin.com/conf/vhost_nginx.conf

what can i do to solve it please?

Thanks a lot
 
Back
Top