Symbolic link not allowed or link target not accessible: /var/www/ispconfig' after creating new site

Discussion in 'General' started by kasproso, Jul 7, 2020.

  1. kasproso

    kasproso New Member

    Hello All

    Since last week I have a strange situation. I don't know what is happening. The thing is, that when I create site and client via api, it breakes ispconfig panel. I got 404 Forbidden. In logs I got

    Code:
    AH00037: Symbolic link not allowed or link target not accessible: /var/www/ispconfig, referer:
    ISPConfig.vhost looks like this:
    Code:
    <Directory /var/www/ispconfig/>
          Options -Indexes +FollowSymLinks +MultiViews +ExecCGI -SymLinksIfOwnerMatch
          AllowOverride AuthConfig Indexes Limit Options FileInfo
          <FilesMatch "\.php$">
            SetHandler fcgid-script
          </FilesMatch>
          FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php
                Require all granted
              </Directory>
    ispconfig.conf
    Code:
    <Directory />
      Options -Indexes +FollowSymLinks -SymLinksIfOwnerMatch
        AllowOverride None
        Require all denied
      </Directory>{/CODE]
    ls /var/www/
    [CODE]
    [email protected]:/var/www# ll
    total 28
    drwxr-xr-x  2 ispapps  ispapps  4096 Jul 18  2019 apps
    drwxr-xr-x 11 root     root     4096 Jul  7 10:39 client
    drwxr-xr-x  3 root     root     4096 Jul 25  2019 clients
    drwxr-xr-x  2 root     root     4096 Jul 25  2019 conf
    drwxr-xr-x  2 root     root     4096 Jul 16  2019 html
    lrwxrwxrwx  1 ispconfig ispcong   34 Jul 18  2019 ispconfig -> /usr/local/ispconfig/interface/web
    I have a multiserver setup on Debian9
    [email protected]:/var/www# cat /etc/debian_version
    9.12

    As I said, I'm trying to understand what is happening. Nothing works. Strange thing is, that this is happening after creating new site. Before that, I can restart machine, restart apache, change settings and everything work's.

    Any idea's?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Probably you pass wrong settings to the api call that created the site so that the site creation actually messes up the whole /var/www folder.
     
  3. kasproso

    kasproso New Member

    Hello @till
    I will talk with developer to check that. But I have test that on two application's.
    I'm testing WHMCS with ispconfig add-on > result same, panel is inaccessible
    My site with Api > same result.

    In case of my application, I have defined limit-templates. On frontend application, I just need to define products with template ID. So from what I know, api is pushing template ID, client creation (if doesn't exist), and adding subdomain. So nothing unsusall.

    In case of WHMCS, I'm not sure what is send with api, but I believe it's similar data.

    Other thing is, that few days ago api call from my app was working fine. since then it's hasn't change. It's starts after first api call from whmcs. And probably now, I don't have vm backup from that date.
     
  4. kasproso

    kasproso New Member

    Ok, another issue.

    I have just create site manually from ispconfig. And this time, after creating site, panel stoops working.
    So no mather what I do, does I create site from api or manually prom panel, I got same result, ispconfig is not working.
    So question is, can I reconfigure ispconfig (all servers)? How can I investigate this issue? Do I need to reinstall all ispconfigs?

    Thanks
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, then it might be that the settings under system > server config > web are wrong or broken or missing.

    https://www.faqforge.com/linux/debugging-ispconfig-3-server-actions-in-case-of-a-failure/

    No. Try to find out what happens using debug mode.
     
  6. kasproso

    kasproso New Member

    Morning @till

    I have setup debug mode. I have made rsync with all servers. All goes well. I have setup new site and this is log result:
    Code:
    08.07.2020-12:32 - DEBUG - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'.
    08.07.2020-12:32 - DEBUG - Found 1 changes, starting update process.
    08.07.2020-12:32 - DEBUG - Calling function 'ssl' from plugin 'apache2_plugin' raised by event 'web_domain_insert'.
    08.07.2020-12:32 - DEBUG - Calling function 'insert' from plugin 'apache2_plugin' raised by event 'web_domain_insert'.
    08.07.2020-12:32 - DEBUG - safe_exec cmd: groupadd  'client14' - return code: 0
    08.07.2020-12:32 - DEBUG - Adding the group: client14
    08.07.2020-12:32 - DEBUG - safe_exec cmd: useradd -d '/var/www/client/client14/web18' -g 'client14'  -G sshusers 'web18' -s /bin/false - return code: 0
    08.07.2020-12:32 - DEBUG - Adding the user: web18
    08.07.2020-12:32 - DEBUG - safe_exec cmd: chattr -i '/var/www/client/client14/web18' - return code: 0
    08.07.2020-12:32 - DEBUG - safe_exec cmd: mkdir -p '/var/log/ispconfig/httpd/dupa123.n24.cloud' - return code: 0
    08.07.2020-12:32 - DEBUG - safe_exec cmd: mount --bind '/var/log/ispconfig/httpd/dupa123.n24.cloud' '/var/www/client/client14/web18/log' - return code: 0
    08.07.2020-12:32 - DEBUG - safe_exec cmd: chattr +i '/var/www/client/client14/web18' - return code: 0
    08.07.2020-12:32 - DEBUG - safe_exec cmd: ln -s '/var/www/client/client14/web18/' '/var/www/dupa123.n24.cloud' - return code: 0
    08.07.2020-12:32 - DEBUG - Creating symlink: ln -s /var/www/client/client14/web18/ /var/www/dupa123.n24.cloud
    08.07.2020-12:32 - DEBUG - safe_exec cmd: ln -s '/var/www/client/client14/web18/' '/var/www/client/client14/dupa123.n24.cloud' - return code: 0
    08.07.2020-12:32 - DEBUG - Creating symlink: ln -s /var/www/client/client14/web18/ /var/www/client/client14/dupa123.n24.cloud
    08.07.2020-12:32 - DEBUG - safe_exec cmd: cp '/usr/local/ispconfig/server/conf/error/en/'* '/var/www/client/client14/web18/web/error/' - return code: 0
    08.07.2020-12:32 - DEBUG - safe_exec cmd: chmod -R a+r '/var/www/client/client14/web18/web/error/' - return code: 0
    08.07.2020-12:32 - DEBUG - safe_exec cmd: cp '/usr/local/ispconfig/server/conf/index/standard_index.html_en' '/var/www/client/client14/web18/web/index.html' - return code: 0
    08.07.2020-12:32 - DEBUG - safe_exec cmd: cp '/usr/local/ispconfig/server/conf/index/favicon.ico' '/var/www/client/client14/web18/web/' - return code: 0
    08.07.2020-12:32 - DEBUG - safe_exec cmd: cp '/usr/local/ispconfig/server/conf/index/robots.txt' '/var/www/client/client14/web18/web/' - return code: 0
    08.07.2020-12:32 - DEBUG - safe_exec cmd: chmod -R a+r '/var/www/client/client14/web18/web/' - return code: 0
    08.07.2020-12:32 - DEBUG - safe_exec cmd: df -T '/var/www/client/client14/web18'|awk 'END{print $2,$NF}' - return code: 0
    08.07.2020-12:32 - DEBUG - safe_exec cmd: which 'setquota' 2> /dev/null - return code: 0
    08.07.2020-12:32 - DEBUG - safe_exec cmd: setquota -u 'web18' '524288' '525312' 0 0 -a &> /dev/null - return code: 0
    setquota: Not setting block grace time on /dev/mapper/web--vg-home because softlimit is not exceeded.
    setquota: Not setting inode grace time on /dev/mapper/web--vg-home because softlimit is not exceeded.
    08.07.2020-12:32 - DEBUG - safe_exec cmd: setquota -T -u 'web18' 604800 604800 -a &> /dev/null - return code: 0
    08.07.2020-12:32 - DEBUG - safe_exec cmd: chown -R 'web18':'client14' '/var/www/client/client14/web18/web' - return code: 0
    08.07.2020-12:32 - DEBUG - safe_exec cmd: chown 'web18':'client14' '/var/www/client/client14/web18/web' - return code: 0
    08.07.2020-12:32 - DEBUG - safe_exec cmd: chattr -i '/var/www/client/client14/web18' - return code: 0
    08.07.2020-12:32 - DEBUG - safe_exec cmd: usermod --groups sshusers 'web18' 2>/dev/null - return code: 0
    08.07.2020-12:32 - DEBUG - safe_exec cmd: chattr +i '/var/www/client/client14/web18' - return code: 0
    08.07.2020-12:32 - DEBUG - safe_exec cmd: touch '/var/log/ispconfig/httpd/dupa123.n24.cloud/error.log' - return code: 0
    08.07.2020-12:32 - DEBUG - safe_exec cmd: which 'apache2ctl' 2> /dev/null - return code: 0
    08.07.2020-12:32 - DEBUG - Writing the vhost file: /etc/apache2/sites-available/dupa123.n24.cloud.vhost
    08.07.2020-12:32 - DEBUG - Creating symlink: /etc/apache2/sites-enabled/100-dupa123.n24.cloud.vhost->/etc/apache2/sites-available/dupa123.n24.cloud.vhost
    08.07.2020-12:32 - DEBUG - Created AWStats config file: /etc/awstats/awstats.dupa123.n24.cloud.conf
    08.07.2020-12:32 - DEBUG - safe_exec cmd: which 'apache2ctl' 2> /dev/null - return code: 0
    08.07.2020-12:32 - DEBUG - Writing the PHP-FPM config file: /etc/php/7.1/fpm/pool.d/web18.conf
    08.07.2020-12:32 - DEBUG - Calling function 'restartPHP_FPM' from module 'web_module'.
    08.07.2020-12:32 - DEBUG - Restarting php-fpm: systemctl reload php7.1-fpm.service
    08.07.2020-12:32 - DEBUG - Apache status is: running
    08.07.2020-12:32 - DEBUG - Calling function 'restartHttpd' from module 'web_module'.
    08.07.2020-12:33 - DEBUG - Restarting httpd: systemctl restart apache2.service
    08.07.2020-12:33 - DEBUG - Apache restart return value is: 0
    08.07.2020-12:33 - DEBUG - Apache online status after restart is: running
    08.07.2020-12:33 - DEBUG - Calling function 'incronInsert' from plugin 'z_php_fpm_incron_reload_plugin' raised by event 'web_domain_insert'.
    08.07.2020-12:33 - DEBUG - Ensured incron trigger file "/var/www/client/client14/web18/private/php-fpm.reload"
    08.07.2020-12:33 - DEBUG - Created incron configuration "/etc/incron.d/web18.conf"
    08.07.2020-12:33 - DEBUG - Processed datalog_id 1217
    08.07.2020-12:33 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    finished.
    I'm not seeing any errors, All seams to be fine. What else I can do?
     

Share This Page