Apache wont start

S25

Verified User
Joined
Oct 8, 2006
Messages
32
Hey all,
Ok 6:10am and I finally must just ask for help!! Been up all night trying to get this to work and to no avail! I updated php and everything actualy in the customapache folder. Now apache won't start.
When I type
[root@www source]# apachectl start
[Fri May 11 23:55:49 2007] [warn] module php5_module is already loaded, skipping
[Fri May 11 23:55:49 2007] [warn] module php4_module is already loaded, skipping
[Fri May 11 23:55:49 2007] [warn] module mod_security.c is already added, skipping
[Fri May 11 23:55:49 2007] [warn] module mod_php5.c is already added, skipping
/usr/sbin/apachectl start: httpd started

It looks ok but it does not start. Same for:
[root@www customapache]# service httpd restart
Stopping httpd: [FAILED]
Starting httpd: [Fri May 11 23:57:24 2007] [warn] module php5_module is already loaded, skipping
[Fri May 11 23:57:24 2007] [warn] module php4_module is already loaded, skipping
[Fri May 11 23:57:24 2007] [warn] module perl_module is already loaded, skipping
[Fri May 11 23:57:24 2007] [warn] module mod_security.c is already added, skipping
[Fri May 11 23:57:24 2007] [warn] module mod_php5.c is already added, skipping
[ OK ]

And i have tried others as well! I think it may be the httpd.conf, Anything wrong you see in it?
Code:
ServerType standalone
ServerRoot "/etc/httpd"
LockFile /var/run/httpd.lock
PidFile /var/run/httpd.pid
ScoreBoardFile logs/apache_runtime_status
ResourceConfig /dev/null
AccessConfig /dev/null

Timeout 300
KeepAlive On
MaxKeepAliveRequests 500
KeepAliveTimeout 5
MinSpareServers 5
MaxSpareServers 20
StartServers 8
MaxClients 450
MaxRequestsPerChild 1000



<IfModule mod_evasive.c>
DOSHashTableSize 3097
DOSPageCount 2
DOSSiteCount 50
DOSPageInterval 1
DOSSiteInterval 1
DOSBlockingPeriod 10
DOSWhitelist 127.0.0.1
DOSEmailNotify [email protected]
</IfModule>
<IfModule mod_security.c>
##########################################
# 12-8-2006
# Wael Isa Mohd
# MOD Security V1.9.4
# http://www.web4host.net
##########################################
# Note:- Mod Security Rules work with v1.9.x and above only
##########################################

# Only inspect dynamic requests
# (YOU MUST TEST TO MAKE SURE IT WORKS AS EXPECTED)
#SecFilterEngine DynamicOnly

SecFilterEngine On

# Reject requests with status 500
SecFilterDefaultAction "deny,log,status:500"

# Some sane defaults
SecFilterScanPOST On
SecFilterCheckURLEncoding On
SecFilterCheckCookieFormat On
SecFilterCheckUnicodeEncoding Off
SecFilterNormalizeCookies On
# enable version 1 (RFC 2965) cookies
SecFilterCookieFormat 1

#SecServerResponseToken Off

#If you want to scan the output, uncomment these
#SecFilterScanOutput On
#SecFilterOutputMimeTypes "(null) text/html text/plain"



# Accept almost all byte values
SecFilterForceByteRange 1 255

# Server masking is optional
#fake server banner - NOYB used - no one needs to know what we are using
SecServerSignature "Power MOD by web4host.net"

#SecUploadDir /tmp
#SecUploadKeepFiles Off

# Only record the interesting stuff
#SecAuditEngine RelevantOnly
SecAuditLog logs/audit_log

# You normally won't need debug logging
#SecFilterDebugLevel 0
SecFilterDebugLog logs/modsec_debug_log

###########################################
# Full Rules found in
# Gotroot.com modsecurity(TM) 
# http://www.gotroot.com
###########################################
# Mini Rules
###########################################
# Additional rules for Apache 2.x ONLY!  Do not add this line if you use Apache 1.x
#Include /etc/modsecurity/apache2.conf
# This recommended rules 
# Power Rules
Include /etc/modsecurity/mini.conf
# Application Security Rules


Include /etc/modsecurity/application.conf
# Patches Rules
Include /etc/modsecurity/patches.conf
# Spam Rules (High server load)
#Include /etc/modsecurity/spam.conf
</IfModule>
#LoadModule mmap_static_module modules/mod_mmap_static.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
<IfDefine HAVE_BANDWIDTH>
LoadModule bandwidth_module   modules/mod_bandwidth.so
</IfDefine>
<IfDefine HAVE_THROTTLE>
LoadModule throttle_module    modules/mod_throttle.so
</IfDefine>
LoadModule env_module         modules/mod_env.so
LoadModule config_log_module  modules/mod_log_config.so
LoadModule agent_log_module   modules/mod_log_agent.so
LoadModule referer_log_module modules/mod_log_referer.so
#LoadModule mime_magic_module  modules/mod_mime_magic.so
LoadModule mime_module        modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule status_module      modules/mod_status.so
LoadModule info_module        modules/mod_info.so
LoadModule includes_module    modules/mod_include.so
LoadModule autoindex_module   modules/mod_autoindex.so
LoadModule dir_module         modules/mod_dir.so
LoadModule cgi_module         modules/mod_cgi.so
LoadModule asis_module        modules/mod_asis.so
LoadModule imap_module        modules/mod_imap.so
LoadModule action_module      modules/mod_actions.so
#LoadModule speling_module     modules/mod_speling.so
LoadModule userdir_module     modules/mod_userdir.so
LoadModule alias_module       modules/mod_alias.so
LoadModule rewrite_module     modules/mod_rewrite.so
LoadModule access_module      modules/mod_access.so
LoadModule auth_module        modules/mod_auth.so
LoadModule anon_auth_module   modules/mod_auth_anon.so
#LoadModule db_auth_module     modules/mod_auth_db.so
#LoadModule auth_any_module    modules/mod_auth_any.so
#LoadModule dbm_auth_module    modules/mod_auth_dbm.so
#LoadModule auth_ldap_module   modules/mod_auth_ldap.so
#LoadModule mysql_auth_module  modules/mod_auth_mysql.so
#LoadModule auth_pgsql_module  modules/mod_auth_pgsql.so
#LoadModule digest_module      modules/mod_digest.so
#LoadModule proxy_module       modules/libproxy.so
#LoadModule cern_meta_module   modules/mod_cern_meta.so
LoadModule expires_module     modules/mod_expires.so
LoadModule headers_module     modules/mod_headers.so
#LoadModule usertrack_module   modules/mod_usertrack.so
#LoadModule example_module     modules/mod_example.so
#LoadModule unique_id_module   modules/mod_unique_id.so
LoadModule setenvif_module    modules/mod_setenvif.so
<IfDefine HAVE_PERL>
LoadModule perl_module        modules/libperl.so
</IfDefine>
<IfDefine HAVE_PHP>
LoadModule php_module         modules/mod_php.so
</IfDefine>
<IfDefine HAVE_PHP3>
#LoadModule php3_module        modules/libphp3.so
</IfDefine>
#<IfDefine HAVE_PHP4>
LoadModule php4_module        modules/libphp4.so
#</IfDefine>
LoadModule php5_module        /usr/lib/apache/libphp5.so
<IfDefine HAVE_DAV>
LoadModule dav_module         modules/libdav.so
</IfDefine>
<IfDefine HAVE_ROAMING>
LoadModule roaming_module     modules/mod_roaming.so
</IfDefine> 
###<IfDefine HAVE_SSL>
LoadModule ssl_module         modules/libssl.so
###</IfDefine>
<IfDefine HAVE_PUT>
LoadModule put_module         modules/mod_put.so
</IfDefine> 
<IfDefine HAVE_PYTHON>
#LoadModule python_module      modules/mod_python.so
</IfDefine> 
LoadModule security_module    /usr/lib/apache/mod_security.so
LoadModule php5_module        /usr/lib/apache/libphp5.so
LoadModule php4_module        /usr/lib/apache/libphp4.so
LoadModule perl_module        /usr/lib/apache/libperl.so




ClearModuleList
#AddModule mod_mmap_static.c
AddModule mod_vhost_alias.c
<IfDefine HAVE_BANDWIDTH>
AddModule mod_bandwidth.c
</IfDefine>
<IfDefine HAVE_THROTTLE>
AddModule mod_throttle.c
</IfDefine>
AddModule mod_security.c
AddModule mod_env.c
AddModule mod_log_config.c
AddModule mod_log_agent.c
AddModule mod_log_referer.c
#AddModule mod_mime_magic.c
AddModule mod_mime.c
AddModule mod_negotiation.c
AddModule mod_status.c
AddModule mod_info.c
AddModule mod_include.c
AddModule mod_autoindex.c
AddModule mod_dir.c
AddModule mod_cgi.c
AddModule mod_asis.c
AddModule mod_imap.c
AddModule mod_actions.c
#AddModule mod_speling.c
AddModule mod_userdir.c
AddModule mod_alias.c
AddModule mod_rewrite.c
AddModule mod_access.c
AddModule mod_auth.c
AddModule mod_auth_anon.c
#AddModule mod_auth_db.c
#AddModule mod_auth_any.c
#AddModule mod_auth_dbm.c
#AddModule auth_ldap.c
#AddModule mod_auth_mysql.c
#AddModule mod_auth_pgsql.c
#AddModule mod_digest.c
#AddModule mod_proxy.c
#AddModule mod_cern_meta.c
AddModule mod_expires.c
AddModule mod_headers.c
#AddModule mod_usertrack.c
#AddModule mod_example.c
#AddModule mod_unique_id.c
AddModule mod_so.c
AddModule mod_setenvif.c
AddModule mod_frontpage.c
<IfDefine HAVE_PERL>
AddModule mod_perl.c
</IfDefine>
<IfDefine HAVE_PHP>
AddModule mod_php.c
</IfDefine>
<IfDefine HAVE_PHP3>
#AddModule mod_php3.c
</IfDefine>
###<IfDefine HAVE_PHP4>
AddModule mod_php5.c
###</IfDefine>
<IfDefine HAVE_DAV>
AddModule mod_dav.c
</IfDefine>
<IfDefine HAVE_ROAMING>
AddModule mod_roaming.c
</IfDefine>
###<IfDefine HAVE_SSL>
AddModule mod_ssl.c
###</IfDefine>
<IfDefine HAVE_PUT>
AddModule mod_put.c
</IfDefine>
<IfDefine HAVE_PYTHON>
AddModule mod_python.c
</IfDefine>
AddModule mod_security.c
AddModule mod_php5.c
AddModule mod_php4.c


Port 80

Listen 80
Listen 443

User apache
Group apache

ServerAdmin root@localhost
DocumentRoot "/var/www/html"

<Directory />
    Options FollowSymLinks
    AllowOverride All
</Directory>
</Directory>

<Directory "/var/www/html">

    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

AddHandler cgi-script .cgi .pl
<IfModule mod_userdir.c>
    #UserDir public_html
    UserDir disabled
</IfModule>

<Directory /home/*>
    AllowOverride All
    Options -MultiViews -Indexes FollowSymlinks IncludesNoExec +Includes
    <Limit GET POST OPTIONS PROPFIND>
        Order allow,deny
        Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS PROPFIND>
        Order deny,allow
        Deny from all
    </LimitExcept>
</Directory>

<IfModule mod_dir.c>
    DirectoryIndex index.html index.htm index.shtml index.php index.php4 index.php3 index.phtml index.cgi
</IfModule>
DirectoryIndex index.html index.htm index.shtml index.php index.php4 index.php3 index.phtml index.cgi
</IfModule>

AccessFileName .htaccess
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</Files>

UseCanonicalName Off

<IfModule mod_mime.c>
    TypesConfig /etc/mime.types
</IfModule>

DefaultType text/plain

<IfModule mod_mime_magic.c>
#   MIMEMagicFile /usr/share/magic.mime
    MIMEMagicFile conf/magic
</IfModule>

HostnameLookups Off

ErrorLog logs/error_log

LogLevel warn

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

LogFormat "%b" bytes

CustomLog logs/access_log combined
    
ServerSignature Off
ServerTokens ProductOnly

######
# Uncomment this next bit if you need to
# see the apache status of all incoming
# connections 
#

#ExtendedStatus On
#<Location /httpd-status>
#SetHandler server-status
#</Location>
    
#
#######

<IfModule mod_alias.c>

    Alias /icons/ "/var/www/icons/"

    <Directory "/var/www/icons">
        Options Indexes MultiViews
        AllowOverride None
        Order allow,deny

     Allow from all
    </Directory>

    Alias /server-images/ "/var/www/html/images/"
    <Directory "/var/www/html/images">
        Options Indexes MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>

    #ScriptAlias /cgi-sbin/ "/var/www/cgi-bin/"
    <Directory "/var/www/cgi-sbin">
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
    </Directory>

</IfModule>


<IfModule mod_autoindex.c>

    IndexOptions FancyIndexing NameWidth=*

    AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

    AddIconByType (TXT,/icons/text.gif) text/*
    AddIconByType (IMG,/icons/image2.gif) image/*
    AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
    
    AddIcon /icons/binary.gif .bin .exe
    AddIcon /icons/binhex.gif .hqx
    AddIcon /icons/tar.gif .tar
    AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
    AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
    AddIcon /icons/a.gif .ps .ai .eps
    AddIcon /icons/layout.gif .html .shtml .htm .pdf
    AddIcon /icons/text.gif .txt
    AddIcon /icons/c.gif .c
    AddIcon /icons/p.gif .pl .py
    AddIcon /icons/f.gif .for
    AddIcon /icons/dvi.gif .dvi
    AddIcon /icons/uuencoded.gif .uu
    AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
    AddIcon /icons/tex.gif .tex
    AddIcon /icons/bomb.gif core

    AddIcon /icons/back.gif ..
    AddIcon /icons/hand.right.gif README
    AddIcon /icons/folder.gif ^^DIRECTORY^^
    AddIcon /icons/blank.gif ^^BLANKICON^^

    DefaultIcon /icons/unknown.gif

    #AddDescription "GZIP compressed document" .gz
    #AddDescription "tar archive" .tar
    #AddDescription "GZIP compressed tar archive" .tgz
    
    ReadmeName README
HeaderName HEADER

    IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

</IfModule>

<IfModule mod_mime.c>

    AddEncoding x-compress Z
    AddEncoding x-gzip gz tgz

    AddLanguage da .dk
    AddLanguage nl .nl
    AddLanguage en .en
    AddLanguage et .ee
    AddLanguage fr .fr
    AddLanguage de .de
    AddLanguage el .el
    AddLanguage he .he
    AddCharset ISO-8859-8 .iso8859-8
    AddLanguage it .it
    AddLanguage ja .ja
    AddCharset ISO-2022-JP .jis
    AddLanguage kr .kr
    AddCharset ISO-2022-KR .iso-kr
    AddLanguage nn .nn
    AddLanguage no .no
    AddLanguage pl .po
    AddCharset ISO-8859-2 .iso-pl
    AddLanguage pt .pt
    AddLanguage pt-br .pt-br
AddLanguage ltz .lu
    AddLanguage ca .ca
    AddLanguage es .es
    AddLanguage sv .se
    AddLanguage cz .cz
    AddLanguage ru .ru
    AddLanguage zh-tw .tw
    AddLanguage tw .tw
    AddCharset Big5         .Big5    .big5
    AddCharset WINDOWS-1251 .cp-1251
    AddCharset CP866        .cp866
    AddCharset ISO-8859-5   .iso-ru
    AddCharset KOI8-R       .koi8-r
    AddCharset UCS-2        .ucs2
    AddCharset UCS-4        .ucs4
    AddCharset UTF-8        .utf8
    
    <IfModule mod_negotiation.c>
        LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw
    </IfModule>
    
    AddType application/x-tar .tgz
    
    <IfModule mod_php5.c>
        AddType application/x-httpd-php .inc .php .php5 .php4 .php3 .phtml
        AddType application/x-httpd-php-source .phps
    </IfModule> 
    <IfModule mod_php3.c>
        AddType application/x-httpd-php3 .php3
        AddType application/x-httpd-php3-source .phps
    </IfModule> 
<IfModule mod_php.c>
        AddType application/x-httpd-php .phtml
    </IfModule>

    AddHandler cgi-script .cgi .pl

    AddType text/html .shtml
    AddHandler server-parsed .shtml

    #AddHandler send-as-is asis

    AddHandler imap-file map

    #AddHandler type-map var

</IfModule>

<IfModule mod_setenvif.c>

    BrowserMatch "Mozilla/2" nokeepalive
    BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
    BrowserMatch "RealPlayer 4\.0" force-response-1.0
    BrowserMatch "Java/1\.0" force-response-1.0
    BrowserMatch "JDK/1\.0" force-response-1.0

</IfModule>

Alias /doc/ /usr/share/doc/
<Directory /usr/share/doc>
    order deny,allow
    deny from all
allow from localhost .localdomain
    Options Indexes FollowSymLinks
</Directory>

###<IfDefine HAVE_SSL>
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl
###</IfDefine> 

<IfModule mod_ssl.c>
#   Pass Phrase Dialog:
#   Configure the pass phrase gathering process.
#   The filtering dialog program (`builtin' is a internal
#   terminal dialog) has to provide the pass phrase on stdout.
SSLPassPhraseDialog  builtin

#   Inter-Process Session Cache:
#   Configure the SSL Session Cache: First the mechanism
#   to use and second the expiring timeout (in seconds).
SSLSessionCache        none
#SSLSessionCache        shmht:logs/ssl_scache(512000)
#SSLSessionCache        shmcb:logs/ssl_scache(512000)
#SSLSessionCache         dbm:logs/ssl_scache
SSLSessionCacheTimeout  300 

#   Semaphore:
#   Configure the path to the mutual exclusion semaphore the
#   SSL engine uses internally for inter-process synchronization.
SSLMutex  file:logs/ssl_mutex
    
#   Pseudo Random Number Generator (PRNG):
#   Configure one or more sources to seed the PRNG of the
#   SSL library. The seed data should be of good random quality.
#   WARNING! On some platforms /dev/random blocks if not enough entropy
#   is available. This means you then cannot use the /dev/random device
#   because it would lead to very long connection times (as long as
#   it requires to make more entropy available). But usually those
#   platforms additionally provide a /dev/urandom device which doesn't
#   block. So, if available, use this one instead. Read the mod_ssl User
#   Manual for more details.
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
#SSLRandomSeed startup file:/dev/random  512
#SSLRandomSeed startup file:/dev/urandom 512
#SSLRandomSeed connect file:/dev/random  512
#SSLRandomSeed connect file:/dev/urandom 512

#   Logging:
#   The home of the dedicated SSL protocol logfile. Errors are
#   additionally duplicated in the general error log file.  Put
#   this somewhere where it cannot be used for symlink attacks on
#   a real server (i.e. somewhere where only root can write).
#   Log levels are (ascending order: higher ones include lower ones):
#   none, error, warn, info, trace, debug.
SSLLog      logs/ssl_engine_log
SSLLogLevel error

</IfModule>

###<IfDefine HAVE_SSL>

##
##  
## SSL Virtual Host Context
##  

<VirtualHost _default_:443>

ErrorLog logs/error_log 
TransferLog logs/access_log

#   SSL Engine Switch:
#   Enable/Disable SSL for this virtual host.
SSLEngine on

#   SSL Cipher Suite:
#   List the ciphers that the client is permitted to negotiate.
#   See the mod_ssl documentation for a complete list.
#SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL

#   Server Certificate:
#   Point SSLCertificateFile at a PEM encoded certificate.  If
#   the certificate is encrypted, then you will be prompted for a
#   pass phrase.  Note that a kill -HUP will prompt again. A test
#   certificate can be generated with `make certificate' under 
#   built time. Keep in mind that if you've both a RSA and a DSA
#   certificate you can configure both in parallel (to also allow
#   the use of DSA ciphers, etc.)
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
#SSLCertificateFile /etc/httpd/conf/ssl.crt/server-dsa.crt

#   Server Private Key:
#   If the key is not combined with the certificate, use this
#   directive to point at the key file.  Keep in mind that if
#   you've both a RSA and a DSA private key you can configure
#   both in parallel (to also allow the use of DSA ciphers, etc.)
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
#SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server-dsa.key

#   Server Certificate Chain:
#   Point SSLCertificateChainFile at a file containing the
#   concatenation of PEM encoded CA certificates which form the
#   certificate chain for the server certificate. Alternatively
#   the referenced file can be the same as SSLCertificateFile
#   when the CA certificates are directly appended to the server
#   certificate for convinience.
#SSLCertificateChainFile /etc/httpd/conf/ssl.crt/ca.crt

#   Certificate Authority (CA):
#   Set the CA certificate verification path where to find CA
#   certificates for client authentication or alternatively one
#   huge file containing all of them (file must be PEM encoded)
#   Note: Inside SSLCACertificatePath you need hash symlinks
#         to point to the certificate files. Use the provided
#         Makefile to update the hash symlinks after changes.
#SSLCACertificatePath /etc/httpd/conf/ssl.crt
#SSLCACertificateFile /etc/httpd/conf/ssl.crt/ca-bundle.crt

#   Certificate Revocation Lists (CRL):
#   Set the CA revocation path where to find CA CRLs for client
#   authentication or alternatively one huge file containing all
#   of them (file must be PEM encoded)
#   Note: Inside SSLCARevocationPath you need hash symlinks
#         to point to the certificate files. Use the provided
#         Makefile to update the hash symlinks after changes.
#SSLCARevocationPath /etc/httpd/conf/ssl.crl
#SSLCARevocationFile /etc/httpd/conf/ssl.crl/ca-bundle.crl

#   Client Authentication (Type):
#   Client certificate verification type and depth.  Types are
#   none, optional, require and optional_no_ca.  Depth is a
#   number which specifies how deeply to verify the certificate
#   issuer chain before deciding the certificate is not valid.
#SSLVerifyClient require
#SSLVerifyDepth  10

#   Access Control: 
#   With SSLRequire you can do per-directory access control based
#   on arbitrary complex boolean expressions containing server
#   variable checks and other lookup directives.  The syntax is a
#   mixture between C and Perl.  See the mod_ssl documentation
#   for more details.
#<Location /> 
#SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
#            and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
#            and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
#            and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
#            and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20       ) \
#           or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
#</Location>

#   SSL Engine Options:
#   Set various options for the SSL engine.
#   o FakeBasicAuth:
#     Translate the client X.509 into a Basic Authorisation.  This means that
#     the standard Auth/DBMAuth methods can be used for access control.  The#     user name is the `one line' version of the client's X.509 certificate.
#     Note that no password is obtained from the user. Every entry in the user
#     file needs this password: `xxj31ZMTZzkVA'.
#   o ExportCertData:
#     This exports two additional environment variables: SSL_CLIENT_CERT and
#     SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
#     server (always existing) and the client (only existing when client
#     authentication is used). This can be used to import the certificates
#     into CGI scripts.
#   o StdEnvVars:
#     This exports the standard SSL/TLS related `SSL_*' environment variables.
#     Per default this exportation is switched off for performance reasons,
#     because the extraction step is an expensive operation and is usually
#     useless for serving static content. So one usually enables the
#     exportation for CGI and SSI requests only.
#   o CompatEnvVars:
#     This exports obsolete environment variables for backward compatibility
#     to Apache-SSL 1.x, mod_ssl 2.0.x, Sioux 1.0 and Stronghold 2.x. Use this
#     to provide compatibility to existing CGI scripts.
#   o StrictRequire:
#     This denies access when "SSLRequireSSL" or "SSLRequire" applied even
#     under a "Satisfy any" situation, i.e. when it applies access is denied
#     and no other module can change it.
#   o OptRenegotiate:
#     This enables optimized SSL connection renegotiation handling when SSL
#     directives are used in per-directory context.
#SSLOptions +FakeBasicAuth +ExportCertData +CompatEnvVars +StrictRequire
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
    SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
SSLOptions +StdEnvVars
</Directory>

SetEnvIf User-Agent ".*MSIE.*" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0

#   Per-Server Logging: 
#   The home of a custom SSL log file. Use this when you want a
#   compact non-error SSL logfile on a virtual host basis.
CustomLog logs/ssl_request_log \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

</VirtualHost>                                   

###</IfDefine>



#Start DirectAdmin Settings
Alias /config /var/www/html/redirect.php
Alias /phpMyAdmin /var/www/html/phpMyAdmin/ 
Alias /phpmyadmin /var/www/html/phpMyAdmin/
Alias /webmail /var/www/html/webmail/
Alias /squirrelmail /var/www/html/squirrelmail/

ErrorDocument 400 /400.shtml
ErrorDocument 401 /401.shtml
ErrorDocument 403 /403.shtml
ErrorDocument 404 /404.shtml
ErrorDocument 500 /500.shtml

#All NameVirtualHost lines are in this file
#Don't remove this line or apache will generate errors.
Include /etc/httpd/conf/ips.conf

LogFormat "%b \"%r\"" homedir
#The default site for the server.
<VirtualHost 213.247.51.218:80>
        ServerAdmin [email protected]
        AliasMatch ^/~([^/]+)(/.*)* /home/$1/public_html$2
        DocumentRoot /var/www/html
        ServerName localhost
        ScriptAlias /cgi-bin/ /var/www/cgi-bin/

        CustomLog /var/log/httpd/homedir.log homedir
</VirtualHost>

<VirtualHost 213.247.51.218:443>
        ServerName localhost
        ServerAdmin [email protected]
        AliasMatch ^/~([^/]+)(/.*)* /home/$1/public_html$2
        DocumentRoot /var/www/html
        ScriptAlias /cgi-bin/ /var/www/cgi-bin/

        SSLEngine on
        SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
        SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key

        CustomLog /var/log/httpd/homedir.log homedir
</VirtualHost>

It may look a bit strange as it was copied and pasted in from vi. Any help at all is appreciated. Basicaly when i try to connect i get this message in firefox:
Unable to connect













Firefox can't establish a connection to the server at








* The site could be temporarily unavailable or too busy. Try again in a few
moments.

* If you are unable to load any pages, check your computer's network
connection.

* If your computer or network is protected by a firewall or proxy, make sure
that Firefox is permitted to access the Web.

If not any ideas? Thanks folks
 
Last edited:
Code:
[root@www customapache]# /etc/init.d/httpd configtest
[Sat May 12 07:42:51 2007] [warn] module php5_module is already loaded, skipping
[Sat May 12 07:42:51 2007] [warn] module php4_module is already loaded, skipping
[Sat May 12 07:42:51 2007] [warn] module mod_security.c is already added, skipping
[Sat May 12 07:42:51 2007] [warn] module mod_php5.c is already added, skipping
Syntax OK
[Sat May 12 07:42:51 2007] [error] Cannot remove module mod_perl.c: not found in module list
 
Hmm sorry for being impatient but any ideas folks? Just the site has been down for near on 20 hours now and I want to try and sort this :)

Thanks
 
Hmm an update!
[root@www conf]# apachectl start
/usr/sbin/apachectl start: httpd started
Now I goto and I get a blank white page, I goto and it asks me to download the page? Ideas? I was messing with httpd.conf and got rid of those error messages.
[root@www conf]# /etc/init.d/httpd configtest
Syntax OK
[root@www conf]# apachectl start
/usr/sbin/apachectl start: httpd (pid 17365) already running

I broke it again,Still no errors from the httpd.conf when it try to start it but it will not start, What you see above is still valid expect
[root@www customapache]# apachectl start
/usr/sbin/apachectl start: httpd started

Even though it is not started! I dont know what to do really! I broke it by re-building everything (i saw it suggested somewhere)

Thanks
 
Last edited:
What was the configuration that didn't work? It looks as if you were trying to load both php4 and php5 as modules. Were you trying to do that?

Had you previously done an httpd upgrade to 2.x? Or was it still trying to use 1.x?

Jeff
 
No it had not been upgraded previosly. I did not intend to do that but it seems to be what was happening (loading php4 and php5 as modules).
 
Back
Top