- Check htaccess file
- Check PHP Version
- Check DNS settings
- Check Nameservers
- Check database connection
- Check the File folder path
- Clear cache
That’s all!
by dev
That’s all!
by dev
Gateway Timeout error 504
504 Gateway Timeout
When using php-cgi add this in httpd.conf
TimeOut 3600
Or add it in Apache config by creating a config file in conf.d dir
touch /usr/local/apache/conf.d/timeout.conf
echo “TimeOut 3600” > /usr/local/apache/conf.d/timeout.conf
service httpd restart
When using PHP-FPM add this in domain vhosts under “proxy_fcgi_module” config:
Domain Apache vhosts location is in /usr/local/apache/conf.d/vhosts
ProxyTimeout 3600
eg :
SetHandler “proxy:unix:/opt/alt/php-fpm72/usr/var/sockets/username.sock|fcgi://localhost”
ProxyTimeout 3600
you can also create a Apache vhost template and add the ProxyTimeout there and use it for the domain you need for increased timeout. You can copy default.stpl and default.tpl to timeout.stpl and timeout.tpl with same content only with below replace config :
php-fpm default templates can be found here :
/usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/httpd/php-fpm
eg :
replace :
SetHandler “proxy:%backend_fcgi%|fcgi://localhost”
with :
SetHandler “proxy:%backend_fcgi%|fcgi://localhost”
ProxyTimeout 3600
after you created the template go to webserver domain config and select the template there under php-fpm thats it or choose default trmeplate in webserver main conf and don’t forget to restart Apache web server if you manually added the timeout in vhost.
If you need Unlimited timeout then you need to disable this apache module :
LoadModule reqtimeout_module modules/mod_reqtimeout.so
go to /usr/local/apache/conf and edit httpd.conf find this line LoadModule reqtimeout_module modules/mod_reqtimeout.so and comment it out i.e. add “#” before this line. Save it and restart Apache server
eg :
#LoadModule reqtimeout_module modules/mod_reqtimeout.so
by dev
1. Login to your server using existing root password.
2. After login you can change the root password with below command.
passwd root
That’s aLL!
by dev
How to disable dangerous php functions
PHP switcher :
echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /usr/local/php/php.d/disabled_function.ini
PHP-CGI selector :
echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php53/usr/php/php.d/disabled_function.ini echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php54/usr/php/php.d/disabled_function.ini echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php55/usr/php/php.d/disabled_function.ini echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php56/usr/php/php.d/disabled_function.ini echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php70/usr/php/php.d/disabled_function.ini echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php71/usr/php/php.d/disabled_function.ini echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php72/usr/php/php.d/disabled_function.ini echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php73/usr/php/php.d/disabled_function.ini echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php74/usr/php/php.d/disabled_function.ini echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php80/usr/php/php.d/disabled_function.ini
PHP_FPM Selector :
** Don’t forget to restart php-fpm after changes
echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm53/usr/php/php.d/disabled_function.ini && service php-fpm53 restart echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm54/usr/php/php.d/disabled_function.ini && service php-fpm54 restart echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm55/usr/php/php.d/disabled_function.ini && service php-fpm55 restart echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm56/usr/php/php.d/disabled_function.ini && service php-fpm56 restart echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm70/usr/php/php.d/disabled_function.ini && service php-fpm70 restart echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm71/usr/php/php.d/disabled_function.ini && service php-fpm71 restart echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm72/usr/php/php.d/disabled_function.ini && service php-fpm72 restart echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm73/usr/php/php.d/disabled_function.ini && service php-fpm73 restart echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm74/usr/php/php.d/disabled_function.ini && service php-fpm74 restart echo "disable_functions = exec, system, popen, proc_open, shell_exec, passthru, show_source" > /opt/alt/php-fpm80/usr/php/php.d/disabled_function.ini && service php-fpm80 restart
How to enable back the dangerous php functions
To enable it back, simply delete disabled_function.ini file for the PHP version you want and restart apache/php-fpm.
by dev
By default, edquota will open up the quota file in an Vi editor, from where you can change the values.
Edit User Quota
edquota -u username
This will edit the quota for user “username”.
Edit Group Quota
To edit group quota, use -g.
edquota -g groupname
This will edit the quota for group “groupname”