Pascal_Netenvie
Regular Pleskian
Ok the 4 commandes lines (said in last post) seems to work if you do an apache restart first.
/etc/init.d/apache2 restart
/usr/local/psa/admin/bin/nginxmng --disable
/usr/local/psa/admin/bin/nginxmng --enable
/usr/local/psa/admin/bin/nginxmng --status
/usr/local/psa/admin/sbin/httpdmng --reconfigure-all
Try this :
Code:/etc/init.d/apache2 restart /usr/local/psa/admin/bin/nginxmng --disable /usr/local/psa/admin/bin/nginxmng --enable /usr/local/psa/admin/bin/nginxmng --status /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
I didn't add sudo at start of commands as you're supposed to be root when doing that.
Command with --status option is just here to check if NGINX is well started.
If it don't work reboot server with command "reboot -n" then do it again.
If it still don't work check your NGINX error log and report here please.
Fail2ban is for another problem : Hack attempt and IP banning.
In your case 504 mean time-out ...
It seems NGINX can't contact Apache or can't contact fast enough.
You have to look at your log.
Log location depend on your server OS but usually it is /var/log/nginx
getting same error gateway timeout. End up the server own public IP added to fail2ban. jail 'plesk-apache-badbot' caused this. Unban and problem fixed!
Fail2ban is for another problem : Hack attempt and IP banning.
In your case 504 mean time-out ...
It seems NGINX can't contact Apache or can't contact fast enough.
You have to look at your log.
Log location depend on your server OS but usually it is /var/log/nginx
Please keep in mind, that the cause of an issue/problem/error will vary, because of individual ( domain/subdomain ) configuration(s) and modification(s) on your server. There is no "general fix" for 502 errors ( Bad gateway )!!!
To help you to investigate your issue(s)/problem(s)/error(s), please INCLUDE depending entries from your log - files ( these locations and log-names can vary on your system, but they will all exist, if the corresponding service(s) is(are) installed! ):
- General webserver - error - logs:
/var/log/apache2/error.log or /var/log/httpd/error.log
/var/log/nginx/error.log
- General PHP - version error - logs:
/var/log/php_errors.log
/var/log/plesk-php54-fpm/error.log
/var/log/plesk-php55-fpm/error.log
/var/log/plesk-php56-fpm/error.log
/var/log/plesk-php70-fpm/error.log
- Domain - specific logs:
/var/www/vhosts/system/(SUB.)DOMAIN.COM/logs/
error_log ( apache2 )
proxy_error_log ( nginx )
The more information(s) you provide ( operating system, webserver - configuration ( incl. modules ), domain-specific PHP - handler in use, log - entries, etc. ), the better will be any help and/or suggestion to solve your issue(s).
If you don't provide enough information(s), people willing to help you are not able to investigate your issue(s)/problem(s)/error(s).
If you are interested in all Plesk - related services, corresponding log - files and general commands for these services, please visit and bookmark:
I found restarting my CSF Firewall fixes the issue.