• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Plesk 12.0.18 502 Nginx issues with WHMCS v5.3.10

I should mention again, that the changes for your own, specific "FcgidIOTimeout" have to be done like described in the KB - article from Parallels:

...
<?php if ($VAR->domain->physicalHosting->scriptTimeout): ?>
FcgidIOTimeout <?php echo $VAR->domain->physicalHosting->scriptTimeout; ?>
+ FcgidIOTimeout 150
...
This means exactly, that you delete the part "<?php echo $VAR->domain->physicalHosting->scriptTimeout; ?>" and set your own value here... ( as described as "+ FcgidIOTimeout 150" )... but you could take as well 360 or even 1800, like the changes from fcgid.conf.
 
Just finished with the poodle fix, If i'm not mistaken. I am sorry, but I am totally lost on your last message. Just checked my fcgid.conf as stated in the KB, but do not see a <?php echo $VAR->domain->physicalHosting->scriptTimeout; ?>
 
nonono... these changes are in "/usr/local/psa/admin/conf/templates/custom/domain/domainVirtualHost.php", your custom template, which you copied as mentioned in the

 
Back again to your Poodle thing:

Sorry to inform you, but you have a mini - mistake, because your certificate doesn't match the server - name. For this issue, you have to create an own certificate and can't use the standard Plesk certificate. You have as well the choice to investigate SSL - issues, by visiting the site "https://www.ssllabs.com/ssltest/"

If you would like to continue with this issue, I would suggest to open another thread, because it might be easier ( as well for other forum readers ), if you don't mix these two issues in one thread.
 
Oh, wait. For some reason the tutorial step didnt work:

cp -p /usr/local/psa/admin/conf/templates/default/domain/domainVirtualHost.php /usr/local/psa/admin/conf/templates/custom/domain/domainVirtualHost.php

It never creates that custom/domain/ folder. Also, my location keeps changing for some reason. When visiting /usr/local/psa, it automatically goes to a different subfolder called /opt/psa


EDIT:
Received the poodle response. Its weird because I never had these issues before.. I have an ssl for a client on the server, with the same IP. Actually, I have the Parallels default ssl for all sites, which doesn't really integrate, but my Plesk sign in is secured with comodo. Not sure why these issues are arising. I thought SSI fixes this issue. Will follow-up with that in a new thread as stated
 
Last edited:
No problem for the issue "opt/psa" - there is a symlink here as well, from "/usr/local/psa" to "opt/psa/"... because there are several linux distributions - not all systems have the path "/usr/local/psa", but the path "/opt/psa/" instead... this depends on your operating system. If you prefer the path "/opt/psa" for further instructions, I'll try to think of that.


Please make sure that the following folders exist, before you try to copy the files, to edit them:

/opt/psa/admin/conf/templates/custom
/opt/psa/admin/conf/templates/custom/domain

If you miss a folder, please use "mkdir /opt/psa/admin/conf/templates/custom" or/and "mkdir /opt/psa/admin/conf/templates/custom/domain"​
 
Got it. It seems my ftp had to refresh to display the folder.. just deleted the section you stated.. now that section looks like this

FcgidMaxRequestLen 2147483648
<?php if ($VAR->domain->physicalHosting->scriptTimeout): ?>
FcgidIOTimeout 1800

Am I suppose to delete this section too? <?php if ($VAR->domain->physicalHosting->scriptTimeout): ?>
 
Yes, you could delete this as well, because you manually edited your configuration - file and so there is no need for this part anymore.

Does your reconfiguration now works as expected? ... if you use:

/usr/local/psa/admin/sbin/httpdmng --reconfigure-all
or
/usr/local/psa/admin/sbin/httpdmng --reconfigure-domain YOURDOMAIN.COM
 
Deleted, but came across more errors:

Details: PHP Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /opt/psa/admin/plib/Template/Processor.php(19) : eval()'d code on line 147
[2014-11-30 12:41:38] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
[2014-11-30 12:41:38] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
PHP Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /opt/psa/admin/plib/Template/Processor.php(19) : eval()'d code on line 147
[2014-11-30 12:41:38] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
[2014-11-30 12:41:38] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
PHP Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /opt/psa/admin/plib/Template/Processor.php(19) : eval()'d code on line 147
[2014-11-30 12:41:38] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
[2014-11-30 12:41:38] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
PHP Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /opt/psa/admin/plib/Template/Processor.php(19) : eval()'d code on line 147
[2014-11-30 12:41:38] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
[2014-11-30 12:41:38] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
PHP Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /opt/psa/admin/plib/Template/Processor.php(19) : eval()'d code on line 147
[2014-11-30 12:41:38] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
[2014-11-30 12:41:38] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
PHP Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /opt/psa/admin/plib/Template/Processor.php(19) : eval()'d code on line 147
[2014-11-30 12:41:38] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
[2014-11-30 12:41:38] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
PHP Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /opt/psa/admin/plib/Template/Processor.php(19) : eval()'d code on line 147
[2014-11-30 12:41:38] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
[2014-11-30 12:41:38] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
PHP Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /opt/psa/admin/plib/Template/Processor.php(19) : eval()'d code on line 147
[2014-11-30 12:41:38] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
[2014-11-30 12:41:38] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
PHP Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /opt/psa/admin/plib/Template/Processor.php(19) : eval()'d code on line 147
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
PHP Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /opt/psa/admin/plib/Template/Processor.php(19) : eval()'d code on line 147
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
PHP Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /opt/psa/admin/plib/Template/Processor.php(19) : eval()'d code on line 147
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
PHP Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /opt/psa/admin/plib/Template/Processor.php(19) : eval()'d code on line 147
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
PHP Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /opt/psa/admin/plib/Template/Processor.php(19) : eval()'d code on line 147
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
PHP Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /opt/psa/admin/plib/Template/Processor.php(19) : eval()'d code on line 147
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
PHP Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /opt/psa/admin/plib/Template/Processor.php(19) : eval()'d code on line 147
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
PHP Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /opt/psa/admin/plib/Template/Processor.php(19) : eval()'d code on line 147
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
PHP Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /opt/psa/admin/plib/Template/Processor.php(19) : eval()'d code on line 147
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
PHP Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /opt/psa/admin/plib/Template/Processor.php(19) : eval()'d code on line 147
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
PHP Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /opt/psa/admin/plib/Template/Processor.php(19) : eval()'d code on line 147
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
PHP Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /opt/psa/admin/plib/Template/Processor.php(19) : eval()'d code on line 147
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
PHP Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /opt/psa/admin/plib/Template/Processor.php(19) : eval()'d code on line 147
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
[2014-11-30 12:41:39] ERR [panel] syntax error, unexpected 'endif' (T_ENDIF)
[2014-11-30 12:41:41] ERR [util_exec] proc_close() failed
[2014-11-30 12:41:50] ERR [util_exec] proc_close() failed
[2014-11-30 12:41:50] ERR [panel] Apache config (14173512850.51725000) generation failed: Template_Exception: apache2: Syntax error on line 265 of /etc/apache2/apache2.conf: Syntax error on line 5 of /etc/apache2/conf.d/zz010_psa_httpd.conf: Syntax error on line 67 of /etc/apache2/plesk.conf.d/server.conf: Syntax error on line 133 of /etc/apache2/plesk.conf.d/ip_default/MYDOMAIN(Thisisyourdomain).com.conf: </VirtualHost> without matching <VirtualHost> section

file: /opt/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 75
code: 0
apache2: Syntax error on line 265 of /etc/apache2/apache2.conf: Syntax error on line 5 of /etc/apache2/conf.d/zz010_psa_httpd.conf: Syntax error on line 67 of /etc/apache2/plesk.conf.d/server.conf: Syntax error on line 133 of /etc/apache2/plesk.conf.d/ip_default/MYDOMAIN(Thisisyourdomain).com.conf: </VirtualHost> without matching <VirtualHost> section

now sure where all of this came about
 
Last edited:
:(

Please post the depending lines, as mentioned in the error:

line 133 of /etc/apache2/plesk.conf.d/ip_default/MYDOMAIN(Thisisyourdomain).com.conf:

Have you probably edited some MORE, than suggested? The error declares, that you have an closing "</VirtualHost>" - tag, but there is no depending open "<VirtualHost>" - tag. This might be caused, when you accidentally copied a double "</VirtualHost>" - line somewhere in your config file.

If you are unsure about the investigations, please zip the folder "/opt/psa/admin/conf/templates/custom" and the folder "/var/www/vhosts/system/MYDOMAIN(Thisisyourdomain).com/conf" and add ithe zip - files to your next answer.
 
Last edited by a moderator:
Hey there,

Sorry for the later response. No, I only edited what was mentioned, unless I made a mistake. :( attached are the files
 

Attachments

  • Folders.zip
    16.4 KB · Views: 1
You have one "<?php endif; ?>" too much at the line 145 in

"/opt/psa/admin/conf/templates/custom/domain/domainVirtualHost.php"​

Please delete this line.


Afterwards, please use again the command:

/usr/local/psa/admin/sbin/httpdmng --reconfigure-all
... to make sure, that you really created ALL needed configuration files. I suppose, that you only used the command with "--reconfigure-domain YOURDOMAIN.COM" ?!?
 
Last edited by a moderator:
Hi there,

Thanks for the follow-up. I used the reconfigure all when I received that error. I tried it now and it worked. No more errors :)
 
Thanks for this. So what would be the next step? For some reason the WHMCS is still coming up with a 502 bad gateway. The same installation, not unless I have to reinstall.
 
Also, when I restart nginx I get this error:

nginxnginx: [warn] 2048 worker_connections exceed open file resource limit: 1024
 
... one last thing... before to continue:

You have the option to setup domain specific PHP - settings for each domain, but as well for subscriptions. With these settings you can as well define the script - timeout, which is used in Plesk templates as you can see at line 149 from "/opt/psa/admin/conf/templates/custom/domain/domainVirtualHost.php". As you can see after your reconfiguration, the config - file "httpd_ip_default.conf" actually shows at line 61 the value "TimeOut 30", which is rather small to your manual edited "FcgidIOTimeout 1800" from "domainVirtualHost.php". Consider raising your PHP - settings over the Plesk Control Panel, in order to raise this ( I would suggest a "max_execution_time" of "360" with your settings ), as you already manually edited at your "example.com.conf" - file at ".../fpm/pool.d*" for your FastCGI - configuration ). It is a good idea, if you would equal your PHP - settings to the same manual edited settings for FastCGI, in order to avoid failures. Reviwe the post http://talk.plesk.com/threads/plesk-12-0-18-502-nginx-issues-with-whmcs-v5-3-10.329259/#post-769096 to equal all your settings over Plesk as well and make sure, that your custom PHP.ini file changed to your desired settings at "/var/www/vhosts/system/example.com/etc/php.ini"
 
For further investigations always be sure to include error - messages as before, because there is no general cause for 502 - gateway errors. It might now be a slightly different message and such informations are necessary for investigations.

In general, if you experience 502 - gateway errors, you can always try to restart apache, nginx and php5-fpm and see if this already solves the issue.
If it doesn't, check if the FastCGI - socket is existent at: /var/www/vhosts/system/example.com/*
Afterwards, always check the error - logs, which mostly point directly to the issue.
 
Hi there,

For the plesk subscription option of this:

php_value[open_basedir] = "/var/www/vhosts/example.com/:/tmp/:/bin:/usr/bin:/usr/local/bin:/usr/share/php:/usr/share/php5:/usr/share/perl:/usr/share/perl5:/usr/bin/python:/usr/bin/python3:/usr/share/psa-pear"

am I changing the example.com to the domain? If so, that means that subscription will only work for that domain, wouldn't it?

Please advise, thnx
 
Back
Top