NGINX & Wordpress

Discussion in 'ISPConfig 3 Priority Support' started by conductive, Oct 26, 2018.

  1. conductive

    conductive Member

    I am running Debian 9 with NGINX on ISPconfig 3.1.12 and installed Wordpress through APS installer.

    To use Post name Permalinks I added the directive

    location / {
    try_files $uri $uri/ /index.php?q=$uri$args;
    }

    This directive works well but I still have a few things that do not work properly.

    Themes and several plugins do not install automatically and require manual installation of zip files.
    I am also currently having a problem with backup plugins such as UPdraft and BackupBuddy. I also have a problem with Page builder Elementor when I use Post name Permalinks and have to change back to Plain Permalinks to use it and then switch back to Post Name when I am done.

    Is there a directive or other that will fix the operation of Wordpress so that All Plugins install and work properly..

    Thanks.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Themes and plugins do not depend on nginx directives (they may after install if they change URL reqriting or caching, but there are no rules required to install them). Do you have the suexec checkbox enabled in the website? Are all files inside the web dir owned by the web user and client group of that site?
     
  3. conductive

    conductive Member

    No.

    I might not completely understand and hence the problem.

    I login to WP as a different user/admin than the ISPconfig client if that is what you mean.
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Login to Wordpress is a different matter.
    But the files in web/ directory of the website should all be owned and group owned by the website user and group. And the suexec ticked on in the website settings, so web server runs as the correct user for that website.
     
  5. conductive

    conductive Member

    Thanks for the Reply,

    I must be really lost on this one.
    I do not see suexec as far as I know that is an Apache feature not related to NGINX.

    As far as I know I am the owner and group owner and have set up 5 clients. Not sure if I SNAFUED something or not and need to go back to the manual but I should have a simple configuration. Do I need to use chown chgrp to reconfigure the vhost website directories?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    That's right, the function which is provided by suexec is always active on nginx. so that's ok.

    You can see which user and group shall own all files and folders inside the web dir on the options tab of the site. the username and group name are listed there.

    If the wordpress files and folders are owned by a different user, then you have to chown them to the user and group of the website.
     
  7. conductive

    conductive Member

    Thanks for the reply.

    under options
    client1 web3

    cd /var/www/mydomain.com

    ls -l
    total 52
    drwxr-xr-x 2 root root 4096 Aug 19 17:11 bin
    drwxr-xr-x 2 web3 client1 4096 Mar 17 2018 cgi-bin
    drwxr-xr-x 2 root root 4096 Oct 25 19:23 dev
    drwxr-xr-x 6 root root 4096 Aug 19 17:11 etc
    drwxr-xr-x 4 root root 4096 Aug 19 17:11 lib
    drwxr-xr-x 2 root root 4096 Aug 19 17:11 lib64
    drwxr-xr-x 2 root root 4096 Oct 26 00:13 log
    drwx--x--- 2 web3 client1 4096 Mar 17 2018 private
    drwxr-xr-x 2 root root 4096 May 21 12:58 ssl
    drwxrwxrwx 3 web3 client1 4096 Oct 25 15:19 tmp
    drwxr-xr-x 6 root root 4096 Aug 19 17:11 usr
    drwxr-xr-x 4 root root 4096 Aug 19 17:11 var
    drwxr-x--x 11 web3 client1 4096 Oct 25 15:19 web
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    You run ls in the website root and not the web directory. What matters is the owner of the files inside the web directory.
     
  9. conductive

    conductive Member

    Thanks.

    [email protected]:/var/www/MyDomain.com/web# ls -l
    total 240
    drwxr-xr-x 3 web3 client1 4096 May 21 13:05 blogs
    drwxr-xr-x 2 web3 client1 4096 Mar 17 2018 error
    -rw-r--r-- 1 web3 client1 418 May 21 13:05 index.php
    -rw-r--r-- 1 web3 client1 19935 May 21 13:10 license.txt
    drwxr-xr-x 2 root root 4096 May 21 19:27 php
    -rw-r--r-- 1 web3 client1 7415 Aug 2 22:49 readme.html
    drwxr-xr-x 12 root root 4096 May 21 18:22 record01
    -rw-r--r-- 1 root root 51 May 25 08:35 robots.txt
    -rw-r--r-- 1 root root 2420 Jul 13 14:06 sitemap.xml
    -rw-r--r-- 1 root root 1852 Jul 13 14:04 sitemap.xml.old
    -rw-r--r-- 1 root root 2117 May 25 20:57 sitemap.xml.save
    drwxr-xr-x 10 web3 client1 4096 Oct 26 00:04 stats
    drwxr-xr-x 2 web3 client1 4096 May 21 13:05 tmp
    -rw-r--r-- 1 web3 client1 5458 May 21 13:10 wp-activate.php
    drwxr-xr-x 9 web3 client1 4096 May 21 13:05 wp-admin
    -rw-r--r-- 1 web3 client1 364 May 21 13:05 wp-blog-header.php
    -rw-r--r-- 1 web3 client1 1889 May 21 13:10 wp-comments-post.php
    -rw-r--r-- 1 web3 client1 3334 Aug 19 17:59 wp-config.php
    -rw-r--r-- 1 web3 client1 2853 May 21 13:05 wp-config-sample.php
    drwxr-xr-x 10 web3 client1 4096 Aug 14 17:31 wp-content
    -rw-r--r-- 1 web3 client1 3669 May 21 13:05 wp-cron.php
    drwxr-xr-x 18 web3 client1 12288 May 21 13:05 wp-includes
    -rw-r--r-- 1 web3 client1 2422 May 21 13:05 wp-links-opml.php
    -rw-r--r-- 1 web3 client1 3306 May 21 13:05 wp-load.php
    -rw-r--r-- 1 web3 client1 37794 Aug 2 22:49 wp-login.php
    -rw-r--r-- 1 web3 client1 8048 May 21 13:05 wp-mail.php
    -rw-r--r-- 1 web3 client1 16246 May 21 13:05 wp-settings.php
    -rw-r--r-- 1 web3 client1 30091 May 21 13:10 wp-signup.php
    -rw-r--r-- 1 web3 client1 4620 May 21 13:05 wp-trackback.php
    -rw-r--r-- 1 web3 client1 3065 May 21 13:05 xmlrpc.php
    [email protected]:/var/www/MyDomain.com/web#
     

Share This Page