Apache and LAMP Notes |
| Thursday, 05 January 2006 20:36 |
|
Apache is a great webserver. It does the job very well. It has a lot of modules and configuration options. It isn't a small implementation, but it is a good one. Welcome! - The Apache HTTP Server Project I usually build apache from source. However, on windows, I like to install the LAMP stack installers...there are many. It is nice because they include a lot of other things like Mysql, PHP, PERL, mingw, etc. For Perl and mod_perl, you need to install an add-on. apache friends - xampp for windows Rob’s Notebook » XAMPP - misc documents relating to XAMPP (like securing it) Build apache from subversion#!/bin/bash svn checkout http://svn.apache.org/repos/asf/httpd/httpd/trunk/ http.trunk cvs -d :pserver: This e-mail address is being protected from spambots. You need JavaScript enabled to view it :/repository checkout -d php5.2 -r PHP_5_2 php5 SSL SetupThe Linux Titbits - Sign your own certificate with OpenSSLNote: you can not run multiple virtual hosts on the same IP. You must have a separate IP and or Port for this to work. This is because SSL is wrapping the HTTP proto. I've hyperlinked some info about this in the SSL/TLS Strong Encryption: FAQ, by the way, you really should read the FAQ before you waste your afternoon. Also, if you are interested in reading more on the problems with name based SSL hosting read this. A good read on things you can do with the openssl tools. Real-world uses for OpenSSL Creating new SSL certs is a straight forward process. openssl req -new -x509 -days 356 -nodes -out server.crt -keyout server.key These files are not encrypted by default and don't have a pass phrase, so Apache will restart without requesting a password. You may create a wildcard SSL certificate which covers many subdomains (*.mydomain.com). This is nice for when you want to have a single SSL cert that can cover multiple hosts (using one IP)... I have heard rumors that it doesn't work in all browsers... but I haven't run into any issues with it. Apache Out Of ControlApache sometimes acts up on my systems... I still have yet to figure out why this is.... but I've at least found a solution that gets my machine up and runnning.Sometimes I login to find MANY httpd processes running zombied or non-responsive. I quickly try to shut down the service using the service scripts, however, the httpd processes stick around. Then I do a trusty killall httpd in hopes that will take care of it. Many times I've had to even set a -9 level for the kill to actually work. Then, you should make sure to clean up the lock files as well as the semaphores left hanging. The lock file comes first, delete /var/lock/subsys/httpd. If you don't do this, you might get the error "httpd dead but subsys locked". Then list all the semaphores by the user that runs as apache. ipcs -s | grep apache If there are a bunch of random open semaphores owned by the apache user, then delete them with the following command. ipcs -s | grep apache | perl -e 'while (<STDIN>) { @a=split(/\s+/); print `ipcrm sem $a[1]`}'
If you don't do this, you run the risk of allowing apache to eat up all your system semaphores which leads to errors like "no space on device", which is very hard to understand at first because your first thought is.... I have space on the drive!!! Web ResourcesApache2, WebDAV, SSL and MySQL: Life In The Fast LaneApache2-SSL-PHP5-Howto (+ Zend Optimizer And IonCube Loader) | HowtoForge - Linux Howtos and Tutorials CAPTCHADoesn't really belong here, but i dunno where else to put it.reCAPTCHA: Stop Spam, Read Books PHP CAPTCHA Library for reCAPTCHA ImageShield as CAPTCHA - VidoopSecure Strong Authentication Demo mod_rewrite.htaccess tricks and tips.. part two: url rewriting with mod rewrite.mod_python | ThoughtSpark.org - has some mod_python code to do auth in python... Apache Log Management
Apache will log to a single file if you ask it to. Backing up log files can be problematic. Managing log files requires careful consideration. Apache Performance
Basic Apache Performance Tips « hurikhan’s Thoughts - interesting to note on this list... 2) Combine your per-vhost logging into one monolithic site-wide log file, 3) Use piped logging instead of direct file logging. |
| Last Updated on Wednesday, 23 November 2011 08:58 |

