Add the following to httpd.conf for resource troubleshooting: ExtendedStatus On SetHandler server-status Order deny,allow Deny from all Allow from myipaddress
Posts Tagged ‘Apache’
Too many open files when several hundred domains in Plesk
December 21st, 2009
No Comments
With more than several hundred domains in plesk, issues can arise with too many open files. Solution: echo ‘ulimit -n 32768′ >> /etc/sysconfig/httpd Enabling piped logging his also helps greatly,: mysql -uadmin -p$(cat /etc/psa/.psa.shadow) -BAND psa -e ‘REPLACE INTO misc VALUES (“apache_pipelog”,”true”)’ /usr/local/psa/admin/bin/websrvmng -a To see the default open file limit per process: ulimit -n [...]
Allow directory listing in Apache
December 21st, 2009
No Comments
Simple I know, but I always forget. # Create a .htaccess file Options +Indexes
mod_rewrite 301 redirect
December 16th, 2009
No Comments
To redirect the entire site, for example to enforce www. , add the following to .htaccess Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} ^domain\.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]