Posts Tagged ‘Apache’

High Availability Linux Web Server Example

Just a quick example of setting up a Linux HA failover environment for an Apache/MySQL web server. This runs through a Ubuntu installation, however RedHat shouldn’t vary too much. – fixed IP of server1 – fixed IP of server2 – apache site1 (virtual IP) – apache site2 (virtual IP) Make sure […]

Using mod_proxy to avoid DNS propagation during site migration

There are a number of ways to migrate a site to a new server, whilst avoiding downtime or data concurrency issues. For a highly dynamic site, generally I would edit the old and new site connection strings to both use the same database during switchover.  mod_proxy is a useful method perhaps if a new version […]

Identifying apache process usage

When apache is running with php as an apache module rather than as a CGI, all processes will run as the apache user.  This makes it a little tricky on a busy multi-site box to identify which sites are using resources and keeping sessions open.  This little command will identify the working directory that the […]

Crazy Zend Errors!

Like so: Zend� 2002062301�1�29734�169503�xù Ÿ2 ì½MlgÇu/x›¤ßÉ0 Y|RlÙn·r«n}>=%ÔJ^Ú‹‘”<Ä“1Ãnþ[Í›ìlK­Á´`A›Ù%›L?H XhÀ… kñyÐBh-ò.öh1„EÀ+ƒ0§îg}ž**’¢¸õÿœ[¿:çÔ©SU§ŒSøüﯽ0Û¼9 xÇ´D‘ ÑJUíÜ¿uûæÍ;mnmí÷SxeÜ3ó?Z½ô@÷åŽ,Ëjkvm{w¶ÕOJ÷²)sãOž¼ü7þðÙN½H§ÀzÞ×¾¤¾„¹Žë;þ,úæâ‡Nm „‰êâöþìêáÚ“W¯ÎÀmØ[3C¿¶³wuóp{o×Ì~»{‡k›;;{/϶[û_§ ùúáá­ÿüÛ¿mìÊ•;{‡³«×aùí›WwníÜ>xøw.=ùôåuø¯µõý½µ§ÁöìíÎv×®íí¯]ÚÛ»¹³ùŸÖÈcõc¤Y{¾ðvnÿß7M¾ Ioncube and Zend Optimizer don’t get on.  Ioncube needs to be loaded by PHP first to avoid problems.  Rather than loading them in php.ini, it’s wiser to add their own ini files in /etc/php.d which is then read alphabetically.

Configuring webdav on apache

enabled the mod_dav modules in httpd.conf add the following to vhost.conf <Directory /var/www/vhosts/> DAV On AuthType Digest AuthName “webdav” AuthUserFile “/var/www/vhosts/” require user test </Directory> You can test by: cadaver dav:!> open put,list,edit etc

Disable Track and Trace in Apache

TraceEnable off is available in Apache 1.3.34, 2.0.55 and later Otherwise you will need to add: RewriteEngine On RewriteCond %{REQUEST_METHOD} ^TRAC(E|K) RewriteRule .* – [F] to a /etc/httpd/conf.d/zz_020_disable_track_trace.conf and possibly to the individual vhost.conf’s

Plesk httpd suexec errors

If Apache is giving suexec errors following a httpd or Plesk upgrade, the Plesk suexec has probably been overwritten.  Copy it back: cp /usr/local/psa/suexec/psa-suexec /usr/sbin/suexec

Subversion on Plesk

Installing Subversion on Plesk Servers with http authentication ————————————— yum install subversion mod_dav_svn service httpd restart cd /var/www/vhosts/ vi vhost.conf : <Location /repos> DAV svn SVNPath /var/www/vhosts/ AuthType Basic AuthName “ repository” AuthUserFile /var/www/vhosts/ Require valid-user </Location> cd .. mkdir svn cd svn svnadmin create repos htpasswd -c htpasswd ftpuser cd .. chown -R ftpuser:apache […]

Apache case insensitive URL’s

If your moving a site from a Windows host to Linux and all of the cases are messed up (Yes Windows is case-insensitive ), you could try to substitute through all the code to make sure the links are the correct case. If your lucky though, enable mod_speling and this should work: # Add the […]

Apache MySQL Authentication

mod_auth_mysql will need to be loaded. in vhost.conf add: AuthType Basic AuthName “Auth required” AuthMySQLHost localhost AuthMySQLUser auth_user AuthMySQLPassword mypassword AuthMySQLDB mysqlauth AuthMysqlUserTable clients AuthMySQLNameField username AuthMySQLPasswordField passwd AuthMySQLPwEncryption none AuthMySQLEnable on require valid-user Then in MySQL: create database mysqlauth; use mysqlauth; CREATE TABLE `clients` ( `username` varchar(25) NOT NULL default ”, `passwd` varchar(25) NOT […]