Wordpress error 500 (Debian 7, nginx)

Discussion in 'ISPConfig 3 Priority Support' started by inside83, Feb 5, 2015.

  1. inside83

    inside83 Member HowtoForge Supporter

    Hello,

    I have migrated site from shared hosting (Apache) to my VPS running Debian 7, nginx and I get error 500.
    My error.log file is over 800 MB (!?!) and it is full of lines like this:
    Code:
    2015/02/05 21:41:24 [error] 5105#0: *14 FastCGI sent in stderr: "sedir restriction in effect. File(/) is not within the allowed path(s): (/var/www/clients/client1/web3/web:/var/www/clients/client1/web3/private:/var/www/clients/client1/web3/tmp:/var/www/goinfobl.com/web:/srv/www/goinfobl.com/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin) in /var/www/clients/client1/web3/web/wp-includes/functions.php on line 1497
    PHP message: PHP Warning:  is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/var/www/clients/client1/web3/web:/var/www/clients/client1/web3/private:/var/www/clients/client1/web3/tmp:/var/www/goinfobl.com/web:/srv/www/goinfobl.com/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin) in /var/www/clients/client1/web3/web/wp-includes/functions.php on line 1497
    PHP message: PHP Warning:  is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/var/www/clients/client1/web3/web:/var/www/clients/client1/web3/private:/var/www/clients/client1/web3/tmp:/var/www/goinfobl.com/web:/srv/www/goinfobl.com/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin) in /var/www/clients/client1/web3/web/wp-includes/functions.php on line 1497
    PHP message: PHP Warning:  is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/var/www/clients/client1/web3/web:/var/www/clients/client1/web3/private:/var/www/clients/client1/web3/tmp:/var/www/goinfobl.com/web:/srv/www/goinfobl.com/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin) in /var/www/clients/client1/web3/web/wp-includes/functions.php on line 1497
    PHP message: PHP Warning:  is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/var/www/clients/client1/web3/web:/var/www/clients/client1/web3/private:/var/www/clients/client1/web3/tmp:/var/www/goinfobl.c
    
    I followed this: https://www.howtoforge.com/community/threads/wordpress-multisite-get-an-502.57031/#post-278108
    Tried adding only
    Code:
    location / {
                    try_files $uri $uri/ /index.php?$args;
           }
    in nginx directives (under options) but nothing seems to work :/

    Please help...
     
  2. inside83

    inside83 Member HowtoForge Supporter

    Strangely, I AM able to log in to the admin console but still get errors when accessing the site.
     
  3. inside83

    inside83 Member HowtoForge Supporter

    SUCCESS!!!
    All I did was to change the path in Settings > Media > Store uploads in this folder to
    /var/www/clients/client1/web5/web/wp-content/uploads
    and THAT did the trick
    Unbelievable! How could the upload path to media store be so damn important!?!

    I even deleted that site from ISPconfig and made a new one so now client1/web4 is empty (I managed to delete all the files and folders in that folder, even the error folder).
    Is there a way to "reclaim" that folder and reset it to default settings?
    I tried to copy original error files from /usr/local/ispconfig/server/conf/error/ to /var/www/clients/client1/web4/web/error/ but even though the files are in the destination folder, the default error pages were not shown (I did that prior to deleting site in web4).
    So basically, this thread is about reclaiming the folder.
     
    Last edited: Feb 6, 2015
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You can use any folder for your media as long as its inside the website directory /var/www/clients/client1/web5/web/.

    Accrding to this error message, wordpress tried to access the server root (the / directory of the whole server) and this is not allowed.

    Do not remove that files. If the files are used or not depends only on the settings that you choose in ispconfig for the website (own error pages).
     
  5. inside83

    inside83 Member HowtoForge Supporter

    Thank you for your response @till
    Wordpress stopped trying to access the server root only after I changed media storage folder. I still can not believe that the site would not load because of this.
    I just looked, there is no web 4 folder under /var/www/clients/client1/ only web1 and web4
    Does that mean that when another site is created for client1 there is goingo to be web6? If yes, what about those in between (or I should not be bothered with such trivial questions)?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The folder of this site is /var/www/clients/client1/web3/web (the one you got the error message from).
     
  7. inside83

    inside83 Member HowtoForge Supporter

    That log file is prior to deletion of site from ISPconfig, when I was still trying to figure out what is wrong.
     

Share This Page