longvnit
17th May 2009, 20:17
I used latest version of apache, php and suphp.
I compiled by command bellow :
### compile apache
./configure \
--prefix=/usr/local/apache \
--enable-layout=Apache \
--enable-modules=all \
--enable-mods-shared=all \
--enable-proxy \
--enable-suexec \
--enable-so \
--with-mpm=prefork \
--with-suexec-caller=apache \
--with-suexec-userdir=public_html \
--with-suexec-docroot=/home \
--with-suexec-logfile=/dev/null \
--with-suexec-safepath=/usr/local/bin:/usr/bin:/bin:/usr/home:/usr/sbin \
--disable-dav \
--disable-dav-fs
### compile php
./configure \
--prefix=/usr/local/php \
--with-mysql=/var/lib/mysql \
--with-config-file-path=/etc \
--enable-cgi \
--enable-force-cgi-redirect \
--enable-mbstring \
--with-jpeg-dir=/usr/lib \
--with-png-dir=/usr/lib \
--with-zlib-dir=/usr/lib \
--with-freetype-dir=/usr/lib \
--without-sqlite \
--with-mysql-sock=/var/lib/mysql \
--with-bz2 --with-curl --enable-bcmath --enable-exif --with-gd \
--with-zlib --enable-calendar --with-openssl --with-gmp \
--enable-ftp --enable-magic-quotes --with-mcrypt --with-mhash --enable-ctype \
--enable-tidy --enable-dom --with-libxml-dir=/usr/lib --enable-libxml --enable-xml \
--enable-xmlreader --enable-xmlwriter --enable-zip --enable-shmop --enable-wddx \
### compile suphp
./configure \
--prefix=/usr/local \
--with-apache-user=apache \
--with-apr=/usr/local/apache/bin \
--with-logfile=/usr/local/apache/logs/suphp.log \
--with-apxs=/usr/local/apache/bin/apxs \
--with-min-uid=500 \
--with-min-gid=500 \
--with-apr=/usr/local/apache/bin
### Suphpconfig in /usr/local/etc/suphp.conf
[global]
;Path to logfile
logfile=/usr/local/apache/logs/suphp.log
;Loglevel
loglevel=info
;User Apache is running as
webserver_user=apache
;Path all scripts have to be in
docroot=/home:${HOME}/public_html
;docroot=/
;Path to chroot() to before executing script
;chroot=/mychroot
; Security options
allow_file_group_writeable=true
allow_file_others_writeable=false
allow_directory_group_writeable=true
allow_directory_others_writeable=false
;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=true
;Send minor error messages to browser
errors_to_browser=true
;PATH environment variable
env_path=/bin:/usr/local/php/bin
;Umask to set, specify in octal notation
umask=0133
; Minimum UID
min_uid=500
; Minimum GID
min_gid=500
[handlers]
;Handler for php-scripts
x-httpd-php="php:/usr/local/php/bin/php-cgi"
;Handler for CGI-scripts
x-suphp-cgi="execute:!self"
### Suexec info
-D AP_DOC_ROOT="/home"
-D AP_GID_MIN=100
-D AP_HTTPD_USER="apache"
-D AP_LOG_EXEC="/dev/null"
-D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin:/usr/home:/usr/sbin"
-D AP_UID_MIN=100
-D AP_USERDIR_SUFFIX="public_html"
### httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin admin@longvnit.net
DocumentRoot "/home/longvnit/public_html"
ServerName longvnit.net
ServerAlias www.longvnit.net
ErrorLog "logs/longvnit.net-error_log"
CustomLog "logs/longvnit.net-access_log" common
SuexecUserGroup longvnit longvnit
suPHP_Engine on
suPHP_AddHandler x-httpd-php
suPHP_UserGroup longvnit longvnit
suPHP_ConfigPath /etc/
</VirtualHost>
But when i used http://longvnit.net then Browser reported Error 403 : HTTP Error 403 Forbidden
I sured that changed mode those folders to 755, files to 644. I used Centos OS 5.2 and Disabled SELinux.
Please help me.
Thanks so much !
I compiled by command bellow :
### compile apache
./configure \
--prefix=/usr/local/apache \
--enable-layout=Apache \
--enable-modules=all \
--enable-mods-shared=all \
--enable-proxy \
--enable-suexec \
--enable-so \
--with-mpm=prefork \
--with-suexec-caller=apache \
--with-suexec-userdir=public_html \
--with-suexec-docroot=/home \
--with-suexec-logfile=/dev/null \
--with-suexec-safepath=/usr/local/bin:/usr/bin:/bin:/usr/home:/usr/sbin \
--disable-dav \
--disable-dav-fs
### compile php
./configure \
--prefix=/usr/local/php \
--with-mysql=/var/lib/mysql \
--with-config-file-path=/etc \
--enable-cgi \
--enable-force-cgi-redirect \
--enable-mbstring \
--with-jpeg-dir=/usr/lib \
--with-png-dir=/usr/lib \
--with-zlib-dir=/usr/lib \
--with-freetype-dir=/usr/lib \
--without-sqlite \
--with-mysql-sock=/var/lib/mysql \
--with-bz2 --with-curl --enable-bcmath --enable-exif --with-gd \
--with-zlib --enable-calendar --with-openssl --with-gmp \
--enable-ftp --enable-magic-quotes --with-mcrypt --with-mhash --enable-ctype \
--enable-tidy --enable-dom --with-libxml-dir=/usr/lib --enable-libxml --enable-xml \
--enable-xmlreader --enable-xmlwriter --enable-zip --enable-shmop --enable-wddx \
### compile suphp
./configure \
--prefix=/usr/local \
--with-apache-user=apache \
--with-apr=/usr/local/apache/bin \
--with-logfile=/usr/local/apache/logs/suphp.log \
--with-apxs=/usr/local/apache/bin/apxs \
--with-min-uid=500 \
--with-min-gid=500 \
--with-apr=/usr/local/apache/bin
### Suphpconfig in /usr/local/etc/suphp.conf
[global]
;Path to logfile
logfile=/usr/local/apache/logs/suphp.log
;Loglevel
loglevel=info
;User Apache is running as
webserver_user=apache
;Path all scripts have to be in
docroot=/home:${HOME}/public_html
;docroot=/
;Path to chroot() to before executing script
;chroot=/mychroot
; Security options
allow_file_group_writeable=true
allow_file_others_writeable=false
allow_directory_group_writeable=true
allow_directory_others_writeable=false
;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=true
;Send minor error messages to browser
errors_to_browser=true
;PATH environment variable
env_path=/bin:/usr/local/php/bin
;Umask to set, specify in octal notation
umask=0133
; Minimum UID
min_uid=500
; Minimum GID
min_gid=500
[handlers]
;Handler for php-scripts
x-httpd-php="php:/usr/local/php/bin/php-cgi"
;Handler for CGI-scripts
x-suphp-cgi="execute:!self"
### Suexec info
-D AP_DOC_ROOT="/home"
-D AP_GID_MIN=100
-D AP_HTTPD_USER="apache"
-D AP_LOG_EXEC="/dev/null"
-D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin:/usr/home:/usr/sbin"
-D AP_UID_MIN=100
-D AP_USERDIR_SUFFIX="public_html"
### httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin admin@longvnit.net
DocumentRoot "/home/longvnit/public_html"
ServerName longvnit.net
ServerAlias www.longvnit.net
ErrorLog "logs/longvnit.net-error_log"
CustomLog "logs/longvnit.net-access_log" common
SuexecUserGroup longvnit longvnit
suPHP_Engine on
suPHP_AddHandler x-httpd-php
suPHP_UserGroup longvnit longvnit
suPHP_ConfigPath /etc/
</VirtualHost>
But when i used http://longvnit.net then Browser reported Error 403 : HTTP Error 403 Forbidden
I sured that changed mode those folders to 755, files to 644. I used Centos OS 5.2 and Disabled SELinux.
Please help me.
Thanks so much !