cd /usr/local/directadmin/custombuild
./build update
mv /usr/local/lib/php.ini /usr/local/lib/php.ini.back
./build php n
mv /usr/local/lib/php.ini.back /usr/local/lib/php.ini
/etc/init.d/httpd restart
Category Archives: Hosting
apache cache control images
FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "max-age=3024000, public"
FilesMatch>
[emerg] (28)No space left on device: Couldn’t create accept lock (/var/log/httpd/acce
for i in `ipcs -s | awk ‘/apache/ {print $2}’`; do (ipcrm -s $i); done
ipcrm -m 0x63637069
ipcs -s | grep nobody | awk ‘ { print $2 } ‘ | xargs ipcrm
Unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR
You are using PHP4, should upgarde PHP version to PHP5.6 or 7.
Checking for psol fails, see autoconf.err log
.You should try older nginx-pagespeed version, or use Centos 7 instead od older version.
own content delivery network CDN nginx
yum install nginx
cd /etc/nginx/conf.d
vi cdn.conf
server {
listen 80;
server_name static.yourdomain.com;
location ~* .(gif|jpg|jpeg|png|wmv|avi|mpg|mpeg|mp4|htm|html|js|css|mp3|swf|ico|flv)$ {
expires max;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://yourdomain.com;
proxy_ignore_headers X-Accel-Expires Expires Cache-Control;
proxy_store /var/www/cache$uri;
proxy_store_access user:rw group:rw all:r;
}
}
chkconfig nginx on
nginx -t
service nginx start
mysql slow query log
slow-query-log = 1
slow-query-log-file = /var/log/mysql/mysql-slow.log
long_query_time = 1
log-queries-not-using-indexes
PHP Fatal error: Uncaught exception ‘PrestaShopException’ with message ‘Shop not found’ in
It means prestashop database is missing. If website was transferred form old server, make sure database was imported.
linux simple http server
python -m SimpleHTTPServer 8888
or
busybox httpd -p xx.xx.xx.xx:8888 -h /var/www/html/some_directory
mysqld got signal 6
innodb_force_recovery = 1
systemd[1]: Failed to start Amavisd-new is an interface between MTA and content checkers.
amavisd -u amavis -c /etc/amavisd/amavisd.conf debug
ERROR 1290 (HY000) at line 1: The MySQL server is running with the –secure-file-priv
mysql> SHOW VARIABLES LIKE "secure_file_priv";
+------------------+-----------------------+
| Variable_name | Value |
+------------------+-----------------------+
| secure_file_priv | /var/lib/mysql-files/ |
+------------------+-----------------------+
1 row in set (0.00 sec)
mysql> Bye
mysql -e "SELECT CONCAT('KILL ',ID,';') FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'user' AND COMMAND = 'Query' AND TIME > 100 INTO OUTFILE '/var/lib/mysql-files/kill_list.txt';" && mysql -e "source /var/lib/mysql-files/kill_list.txt" && rm -rf /var/lib/mysql-files/kill_list.txt
[core:emerg] [pid :tid ] (28)No space left on device: AH00023: Couldn’t create the proxy mutex
[core:emerg] [pid 7732:tid 140396300543936] (28)No space left on device: AH00023: Couldn’t create the proxy mutex
[proxy:crit] [pid 7732:tid 140396300543936] (28)No space left on device: AH02478: failed to create proxy mutex
Fix:
ipcs | grep apache | awk ‘{print $2}’ > sem.txt
for i in `cat sem.txt`; do { ipcrm -s $i; }; done
Permanant fix:
vi /etc/sysctl.conf
kernel.msgmni = 1024
kernel.sem = 250 256000 32 1024
[error] (17)File exists: Cannot create SSLMutex with file `/var/log/httpd/ssl_mutex’
mv /var/log/httpd/ssl_mutex /var/log/httpd/ssl_mutex___
/etc/init.d/httpd start
ERROR 1170 (42000): BLOB/TEXT column ‘name’ used in key specification without a key lengt
create index name on table_name (name(100));