Author: llzqq: Openbsd3.6 + APACHE + MYSQL + PHP + mod_limitipconn: http://www.cnfug.org] <br/> Op author: llzqq [from: http://www.cnfug.org]
Openbsd 3.6 + APACHE + MYSQL + PHP + mod_limitipconn
Llzqq <llzqq@126.com>
You are welcome to post this article, but you must keep the following copyright information:
This article aims to build the server environment using the installation package provided by OPENBSD. of course, you can also download the original code package for compilation and installation, but the OPENBSD security is not guaranteed easily. As there is dependency between packages, the following lists all the installation packages used in this article. you can copy all the following packages to a directory and install them smoothly:
The following script is created to enable and disable the MYSQL service:
# Vi/etc/rc. d/mysqld. sh
========================================================== ======================
#! /Usr/local/bin/bash
# Made by llzqq
#02/08/2004
# Mysql startup scripts
# Cp/usr/local/share/doc/php4/php. ini-recommended/var/www/conf/php. ini
#/Usr/local/sbin/phpxs-s
#/Usr/local/sbin/phpxs-a gd
Since APACHE on OPENBSD adopts the CHROOT mechanism, to ensure the normal operation of PHP, we need to create the following directory as the working directory of PHP:
# Mkdir/var/www/tmp
# Chmod 1777/var/www/tmp
# Pkg_add php4-mysql-4.3.8.tgz
Run the following command to make it take effect
#/Usr/local/sbin/phpxs-a mysql
# Pkg_add php4-ncurses-4.3.8.tgz
Run the following command to make it take effect
#/Usr/local/sbin/phpxs-a ncurses
# Pkg_add php4-imap-4.3.8.tgz
Run the following command to make it take effect
#/Usr/local/sbin/phpxs-a imap
# Vi/var/www/conf/httpd. conf
DirectoryIndex index.html index. php
AddType application/x-httpd-php. php
AddType application/x-httpd-php-source. phps
# Vi/var/www/conf/php. ini
Doc_root = "/htdocs"
Register_globals = On
Create a test php page
# Vi/var/www/htdocs/test. php
Test:
# Pkill httpd
#/Usr/sbin/httpd
Enter http: // IP/test. php in the browser to experiment.
Install the mod_limitipconn module to limit the number of concurrent connections of a single IP address
# Tar xzf mod_limitipconn-0.04.tar.gz
# Cd mod_limitipconn-0.04
# Vi Makefile
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.