Jase-R
asked on
Transfering server from mod_php to Apache 2.2.10 cPanel 11 PHP 5.2.6 (MPM Woker fastcgi xcache)
Server Details
Hard Ware
Quad Core Xeon 2.4Ghz, 4GB Ram, 500 GB Hard Drive.
Software (Current Setup)
CentOS 5.2 (Final), cPanel 11, Apache 2.2.10, PHP 5.2.6.
Question
My current setup is running Apache as mod_php under cPanel server that will only every run one site with the view to scalability and adding more servers for MySQL or Images.
I want to transfer this to Apache running MPM Worker and mod_fastcgi with fast cgi enabled in PHP. I can do this with EasyApache but cPanel does not auto config httpd.conf and the virtual host like it does for mod_php.
I need a detailed step by step setup to enable this and get everything in order for this to work correctly. The script this site is running is based on these requirements.
http://www.mediasharesuite.com/products/mediashare/requirements/
Any other advise on the whole approach I am using is also welcome.
The reason I chose to move away from mod_php and MPM Prefork is for scalability. This approach is less resource intensive and will scale much better and be less intensive on the server.
You help is greatly appreciated!
Hard Ware
Quad Core Xeon 2.4Ghz, 4GB Ram, 500 GB Hard Drive.
Software (Current Setup)
CentOS 5.2 (Final), cPanel 11, Apache 2.2.10, PHP 5.2.6.
Question
My current setup is running Apache as mod_php under cPanel server that will only every run one site with the view to scalability and adding more servers for MySQL or Images.
I want to transfer this to Apache running MPM Worker and mod_fastcgi with fast cgi enabled in PHP. I can do this with EasyApache but cPanel does not auto config httpd.conf and the virtual host like it does for mod_php.
I need a detailed step by step setup to enable this and get everything in order for this to work correctly. The script this site is running is based on these requirements.
http://www.mediasharesuite.com/products/mediashare/requirements/
Any other advise on the whole approach I am using is also welcome.
The reason I chose to move away from mod_php and MPM Prefork is for scalability. This approach is less resource intensive and will scale much better and be less intensive on the server.
You help is greatly appreciated!
Ok...from what I gather you are trying to run fastcgi on apache...correct me if i am wrong? If so here is a link that may help. http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html My next question is are you hosting this yourself or are you having someone host if for you? Sounds to me like you are having someone host if for you since you mentioned Cpanel. If so you may want to check with your host and work with them on getting it loaded.
ASKER
Yes I'm trying to run fastcgi on apache. Im hosting this my self its my own leased server.
For apache their are 2 options that I know of
mod_fcgid (http://fastcgi.coremail.cn/)
and
mod_fastcgi (www.fastcgi.com)
mod_fastcgi is gear more to windows machines so i would suggest installing mod_fcgid...here is a quick link the instructions that you will need to follow to install it. http://fastcgi.coremail.cn/configuration.htm#PHP
mod_fcgid (http://fastcgi.coremail.cn/)
and
mod_fastcgi (www.fastcgi.com)
mod_fastcgi is gear more to windows machines so i would suggest installing mod_fcgid...here is a quick link the instructions that you will need to follow to install it. http://fastcgi.coremail.cn/configuration.htm#PHP
Sorry...that was a link to what you need to put inside your http.conf file.
ASKER
Is there anything else that would need to be updated in apache or php configuration when moving from mod_php to mod_fcgid?
Shouldnt be...its basically a third party plugin for apache. Once you have everything in place all you will need to do is place the following lines in the http.conf and everything should work.
LoadModule fcgid_module modules/mod_fcgid.so
<Directory /usr/local/apache2/htdocs/ php>
SetHandler fcgid-script
FCGIWrapper /usr/local/bin/php .php
# You need mod_fcgid version >= 2.1 to support arguments in FCGIWrapper, if you want
# FCGIWrapper "/usr/local/bin/php -c /etc/" .php
Options ExecCGI
allow from all
</Directory>
LoadModule fcgid_module modules/mod_fcgid.so
<Directory /usr/local/apache2/htdocs/
SetHandler fcgid-script
FCGIWrapper /usr/local/bin/php .php
# You need mod_fcgid version >= 2.1 to support arguments in FCGIWrapper, if you want
# FCGIWrapper "/usr/local/bin/php -c /etc/" .php
Options ExecCGI
allow from all
</Directory>
ASKER
This the most basic you need for it to work don't you need to set up kill process for idle threads fastcgi?
Here is my conf
Include "/usr/local/apache/conf/in cludes/pre _main_glob al.conf"
Include "/usr/local/apache/conf/in cludes/pre _main_2.co nf"
RLimitMEM 470370986
RLimitCPU 240
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Direct modifications to the Apache configuration file may be lost upon subsequent regeneration of the #
# configuration file. To have modifications retained, all modifications must be checked into the #
# configuration system by running: #
# /usr/local/cpanel/bin/apac he_conf_di stiller --update #
# To see if your changes will be conserved, regenerate the Apache configuration file by running: #
# /usr/local/cpanel/bin/buil d_apache_c onf #
# and check the configuration file for your alterations. If your changes have been ignored, then they will #
# need to be added directly to their respective template files. #
# #
# It is also possible to add custom directives to the various "Include" files loaded by this httpd.conf #
# For detailed instructions on using Include files and the apache_conf_distiller with the new configuration #
# system refer to the documentation at: http://www.cpanel.net/support/docs/ea/ea3/customdirectives.html #
# #
# This configuration file was built from the following templates: #
# /var/cpanel/templates/apac he2/main.d efault #
# /var/cpanel/templates/apac he2/main.l ocal #
# /var/cpanel/templates/apac he2/vhost. default #
# /var/cpanel/templates/apac he2/vhost. local #
# /var/cpanel/templates/apac he2/ssl_vh ost.defaul t #
# /var/cpanel/templates/apac he2/ssl_vh ost.local #
# #
# Templates with the '.local' extension will be preferred over templates with the '.default' extension. #
# The only template updated by the apache_conf_distiller is main.default. #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
LoadModule perl_module modules/mod_perl.so
#LoadModule bwlimited_module modules/mod_bwlimited.so
Include "/usr/local/apache/conf/ph p.conf"
Include "/usr/local/apache/conf/mo dsec2.conf "
ErrorLog "logs/error_log"
DefaultType text/plain
AddType text/html .shtml
KeepAlive On
KeepAliveTimeout 5
MaxKeepAliveRequests 100
LimitRequestBody 272629760
ServerTokens Prod
<Directory "/">
Options All
AllowOverride All
</Directory>
<Directory "/usr/local/apache/htdocs" >
Options Includes None
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
AllowOverride None
Satisfy All
</Directory>
<Files ~ "^error_log$">
Order allow,deny
Deny from all
Satisfy All
</Files>
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
CustomLog "logs/access_log" common
<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin /"
</IfModule>
<Directory "/usr/local/apache/cgi-bin ">
AllowOverride None
Options None
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Satisfy All
</Directory>
<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
</IfModule>
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Direct modifications to the Apache configuration file may be lost upon subsequent regeneration of the #
# configuration file. To have modifications retained, all modifications must be checked into the #
# configuration system by running: #
# /usr/local/cpanel/bin/apac he_conf_di stiller --update #
# To see if your changes will be conserved, regenerate the Apache configuration file by running: #
# /usr/local/cpanel/bin/buil d_apache_c onf #
# and check the configuration file for your alterations. If your changes have been ignored, then they will #
# need to be added directly to their respective template files. #
# #
# It is also possible to add custom directives to the various "Include" files loaded by this httpd.conf #
# For detailed instructions on using Include files and the apache_conf_distiller with the new configuration #
# system refer to the documentation at: http://www.cpanel.net/support/docs/ea/ea3/customdirectives.html #
# #
# This configuration file was built from the following templates: #
# /var/cpanel/templates/apac he2/main.d efault #
# /var/cpanel/templates/apac he2/main.l ocal #
# /var/cpanel/templates/apac he2/vhost. default #
# /var/cpanel/templates/apac he2/vhost. local #
# /var/cpanel/templates/apac he2/ssl_vh ost.defaul t #
# /var/cpanel/templates/apac he2/ssl_vh ost.local #
# #
# /var/cpanel/templates/apac he2/ssl_vh ost.local #
# #
# Templates with the '.local' extension will be preferred over templates with the '.default' extension. #
# The only template updated by the apache_conf_distiller is main.default. #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
PidFile logs/httpd.pid
LockFile logs/accept.lock
# Defined in /var/cpanel/cpanel.config: apache_port
Listen 0.0.0.0:80
Timeout 4650
User nobody
Group nobody
ExtendedStatus On
ServerAdmin
ServerName
LogLevel warn
ServerSignature Off
RewriteMap LeechProtect prg:/usr/local/cpanel/bin/ leechprote ct
RewriteLock /usr/local/apache/logs/rew rite_lock
UserDir public_html
# DirectoryIndex is set via the WHM -> Service Configuration -> Apache Setup -> DirectoryIndex Priority
DirectoryIndex index.html.var index.htm index.html index.shtml index.xhtml index.wml index.perl index.pl index.plx index.ppl index.cgi index.$
SSLPassPhraseDialog builtin
SSLSessionCache dbm:/usr/local/apache/logs /ssl_scach e
SSLSessionCacheTimeout 300
SSLMutex file:/usr/local/apache/log s/ssl_mute x
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
<IfDefine SSL>
# Defined in /var/cpanel/cpanel.config: apache_ssl_port
Listen 0.0.0.0:443
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
</IfDefine>
AddHandler cgi-script .cgi .pl .plx .ppl .perl
AddHandler server-parsed .shtml
AddType text/html .shtml
AddHandler server-parsed .shtml
AddType text/html .shtml
AddType application/x-tar .tgz
AddType text/vnd.wap.wml .wml
AddType image/vnd.wap.wbmp .wbmp
AddType text/vnd.wap.wmlscript .wmls
AddType application/vnd.wap.wmlc .wmlc
AddType application/vnd.wap.wmlscr iptc .wmlsc
<Location /whm-server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
# SUEXEC is supported
Include "/usr/local/apache/conf/in cludes/pre _virtualho st_global. conf"
Include "/usr/local/apache/conf/in cludes/pre _virtualho st_2.conf"
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
NameVirtualHost 464646464
NameVirtualHost *
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
<VirtualHost :80>
ServerName s1.
DocumentRoot /usr/local/apache/htdocs
ServerAdmin
UserDir disable
</VirtualHost>
# Default vhost for unbound IPs
<VirtualHost *>
ServerName s1.
DocumentRoot /usr/local/apache/htdocs
ServerAdmin @gmail.com
UserDir disable
</VirtualHost>
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
<VirtualHost **********:80>
ServerName********.com
ServerAlias www.
DocumentRoot /home/******/public_html
ServerAdmin webmaster@j
UseCanonicalName Off
CustomLog /usr/local/apache/domlogs/ combined
CustomLog /usr/local/apache/domlogs/ -bytes_log "%{%s}t %I .\n%{%s}t %O ."
## User ******* # Needed for Cpanel::ApacheConf
UserDir disabled
UserDir enabled *******
<IfModule !mod_disable_suexec.c>
SuexecUserGroup ******* *******
</IfModule>
ScriptAlias /cgi-bin/ /home/********/public_html /cgi-bin/
Include "/usr/local/apache/conf/us erdata/std /2/******* **/******* *****.com/ *.conf"
</VirtualHost>
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
<VirtualHost *************80>
ServerName blog
ServerAlias www.
DocumentRoot /home/*******/public_html/ blog
ServerAdmin webmaster@
UseCanonicalName Off
CustomLog /usr/local/apache/domlogs/ blog..com combined
CustomLog /usr/local/apache/domlogs/ blog..com- bytes_log "%{%s}t %I .\n%{%s}t %O ."
## User******** # Needed for Cpanel::ApacheConf
UserDir disabled
UserDir enabled *****
<IfModule concurrent_php.c>
php4_admin_value open_basedir "/home/jgnr396:/usr/lib/ph p:/usr/php 4/lib/php: /usr/local /lib/php:/ usr/local/ php4/lib/p hp:/tmp"
php5_admin_value open_basedir "/home/jgnr396:/usr/lib/ph p:/usr/loc al/lib/php :/tmp"
</IfModule>
<IfModule !concurrent_php.c>
<IfModule mod_php4.c>
php_admin_value open_basedir "/home/jgnr396:/usr/lib/ph p:/usr/php 4/lib/php: /usr/local /lib/php:/ usr/local/ php4/lib/p hp:/tmp"
</IfModule>
<IfModule mod_php5.c>
php_admin_value open_basedir "/home/jgnr396:/usr/lib/ph p:/usr/loc al/lib/php :/tmp"
<IfModule mod_php5.c>
php_admin_value open_basedir "/home/jgnr396:/usr/lib/ph p:/usr/loc al/lib/php :/tmp"
</IfModule>
<IfModule sapi_apache2.c>
php_admin_value open_basedir "/home/jgnr396:/usr/lib/ph p:/usr/php 4/lib/php: /usr/local /lib/php:/ usr/local/ php4/lib/p hp:/tmp"
</IfModule>
</IfModule>
<IfModule !mod_disable_suexec.c>
SuexecUserGroup ***** ******
</IfModule>
ScriptAlias /cgi-bin/ /home/*****/public_html/bl og/cgi-bin /
# To customize this VirtualHost use an include file at the following location
# Include "/usr/local/apache/conf/us erdata/std /2/jgnr396 /blog..com /*.conf"
</VirtualHost>
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
# SSL
<IfDefine SSL>
</IfDefine>
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
Include "/usr/local/apache/conf/in cludes/err ordocument .conf"
Alias /bandwidth/ /usr/local/bandmin/htdocs/
Alias /sys_cpanel/ /usr/local/cpanel/sys_cpan el/
Alias /java-sys/ /usr/local/cpanel/java-sys /
Alias /img-sys/ /usr/local/cpanel/img-sys/
Alias /akopia/ /usr/local/cpanel/3rdparty /interchan ge/share/a kopia/
Alias /neo-images/ /usr/local/cpanel/base/neo mail/neo-i mages/
Alias /mailman/archives/ /usr/local/cpanel/3rdparty /mailman/a rchives/pu blic/
Alias /pipermail/ /usr/local/cpanel/3rdparty /mailman/a rchives/pu blic/
Alias /interchange/ /usr/local/cpanel/3rdparty /interchan ge/share/i nterchange /
Alias /interchange-5/ /usr/local/cpanel/3rdparty /interchan ge/share/i nterchange -5/
ScriptAlias /cgi-sys/ /usr/local/cpanel/cgi-sys/
ScriptAlias /mailman/ /usr/local/cpanel/3rdparty /mailman/c gi-bin/
ScriptAliasMatch ^/?cpanel/?$ /usr/local/cpanel/cgi-sys/ redirect.c gi
ScriptAliasMatch ^/?securecpanel/?$ /usr/local/cpanel/cgi-sys/ sredirect. cgi
ScriptAliasMatch ^/?kpanel/?$ /usr/local/cpanel/cgi-sys/ redirect.c gi
ScriptAliasMatch ^/?controlpanel/?$ /usr/local/cpanel/cgi-sys/ redirect.c gi
ScriptAliasMatch ^/?kpanel/?$ /usr/local/cpanel/cgi-sys/ redirect.c gi
ScriptAliasMatch ^/?controlpanel/?$ /usr/local/cpanel/cgi-sys/ redirect.c gi
ScriptAliasMatch ^/?securecontrolpanel/?$ /usr/local/cpanel/cgi-sys/ sredirect. cgi
ScriptAliasMatch ^/?webmail/?$ /usr/local/cpanel/cgi-sys/ wredirect. cgi
ScriptAliasMatch ^/?whm/?$ /usr/local/cpanel/cgi-sys/ whmredirec t.cgi
ScriptAliasMatch ^/?securewhm/?$ /usr/local/cpanel/cgi-sys/ swhmredire ct.cgi
# CPANEL/WHM/WEBMAIL/WEBDISK PROXY SUBDOMAINS
<VirtualHost :80 *>
ServerName s1..com
ServerAlias cpanel.* whm.* webmail.* webdisk.*
DocumentRoot /usr/local/apache/htdocs
ServerAdmin @gmail.com
UserDir disable
RewriteEngine On
RewriteCond %{HTTP_HOST} ^cpanel\.
RewriteRule ^/(.*) http://127.0.0.1:2082/$1 [P]
RewriteCond %{HTTP_HOST} ^webmail\.
RewriteRule ^/(.*) http://127.0.0.1:2095/$1 [P]
RewriteCond %{HTTP_HOST} ^whm\.
RewriteRule ^/(.*) http://127.0.0.1:2086/$1 [P]
RewriteCond %{HTTP_HOST} ^webdisk\.
RewriteRule ^/(.*) http://127.0.0.1:2077/$1 [P]
UseCanonicalName Off
</VirtualHost>
Include "/usr/local/apache/conf/in cludes/pos t_virtualh ost_global .conf"
Include "/usr/local/apache/conf/in cludes/pos t_virtualh ost_2.conf "
Here is my conf
Include "/usr/local/apache/conf/in
Include "/usr/local/apache/conf/in
RLimitMEM 470370986
RLimitCPU 240
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Direct modifications to the Apache configuration file may be lost upon subsequent regeneration of the #
# configuration file. To have modifications retained, all modifications must be checked into the #
# configuration system by running: #
# /usr/local/cpanel/bin/apac
# To see if your changes will be conserved, regenerate the Apache configuration file by running: #
# /usr/local/cpanel/bin/buil
# and check the configuration file for your alterations. If your changes have been ignored, then they will #
# need to be added directly to their respective template files. #
# #
# It is also possible to add custom directives to the various "Include" files loaded by this httpd.conf #
# For detailed instructions on using Include files and the apache_conf_distiller with the new configuration #
# system refer to the documentation at: http://www.cpanel.net/support/docs/ea/ea3/customdirectives.html #
# #
# This configuration file was built from the following templates: #
# /var/cpanel/templates/apac
# /var/cpanel/templates/apac
# /var/cpanel/templates/apac
# /var/cpanel/templates/apac
# /var/cpanel/templates/apac
# /var/cpanel/templates/apac
# #
# Templates with the '.local' extension will be preferred over templates with the '.default' extension. #
# The only template updated by the apache_conf_distiller is main.default. #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
LoadModule perl_module modules/mod_perl.so
#LoadModule bwlimited_module modules/mod_bwlimited.so
Include "/usr/local/apache/conf/ph
Include "/usr/local/apache/conf/mo
ErrorLog "logs/error_log"
DefaultType text/plain
AddType text/html .shtml
KeepAlive On
KeepAliveTimeout 5
MaxKeepAliveRequests 100
LimitRequestBody 272629760
ServerTokens Prod
<Directory "/">
Options All
AllowOverride All
</Directory>
<Directory "/usr/local/apache/htdocs"
Options Includes None
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
AllowOverride None
Satisfy All
</Directory>
<Files ~ "^error_log$">
Order allow,deny
Deny from all
Satisfy All
</Files>
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
CustomLog "logs/access_log" common
<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin
</IfModule>
<Directory "/usr/local/apache/cgi-bin
AllowOverride None
Options None
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Satisfy All
</Directory>
<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
</IfModule>
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Direct modifications to the Apache configuration file may be lost upon subsequent regeneration of the #
# configuration file. To have modifications retained, all modifications must be checked into the #
# configuration system by running: #
# /usr/local/cpanel/bin/apac
# To see if your changes will be conserved, regenerate the Apache configuration file by running: #
# /usr/local/cpanel/bin/buil
# and check the configuration file for your alterations. If your changes have been ignored, then they will #
# need to be added directly to their respective template files. #
# #
# It is also possible to add custom directives to the various "Include" files loaded by this httpd.conf #
# For detailed instructions on using Include files and the apache_conf_distiller with the new configuration #
# system refer to the documentation at: http://www.cpanel.net/support/docs/ea/ea3/customdirectives.html #
# #
# This configuration file was built from the following templates: #
# /var/cpanel/templates/apac
# /var/cpanel/templates/apac
# /var/cpanel/templates/apac
# /var/cpanel/templates/apac
# /var/cpanel/templates/apac
# /var/cpanel/templates/apac
# #
# /var/cpanel/templates/apac
# #
# Templates with the '.local' extension will be preferred over templates with the '.default' extension. #
# The only template updated by the apache_conf_distiller is main.default. #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
PidFile logs/httpd.pid
LockFile logs/accept.lock
# Defined in /var/cpanel/cpanel.config:
Listen 0.0.0.0:80
Timeout 4650
User nobody
Group nobody
ExtendedStatus On
ServerAdmin
ServerName
LogLevel warn
ServerSignature Off
RewriteMap LeechProtect prg:/usr/local/cpanel/bin/
RewriteLock /usr/local/apache/logs/rew
UserDir public_html
# DirectoryIndex is set via the WHM -> Service Configuration -> Apache Setup -> DirectoryIndex Priority
DirectoryIndex index.html.var index.htm index.html index.shtml index.xhtml index.wml index.perl index.pl index.plx index.ppl index.cgi index.$
SSLPassPhraseDialog builtin
SSLSessionCache dbm:/usr/local/apache/logs
SSLSessionCacheTimeout 300
SSLMutex file:/usr/local/apache/log
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
<IfDefine SSL>
# Defined in /var/cpanel/cpanel.config:
Listen 0.0.0.0:443
AddType application/x-x509-ca-cert
AddType application/x-pkcs7-crl .crl
</IfDefine>
AddHandler cgi-script .cgi .pl .plx .ppl .perl
AddHandler server-parsed .shtml
AddType text/html .shtml
AddHandler server-parsed .shtml
AddType text/html .shtml
AddType application/x-tar .tgz
AddType text/vnd.wap.wml .wml
AddType image/vnd.wap.wbmp .wbmp
AddType text/vnd.wap.wmlscript .wmls
AddType application/vnd.wap.wmlc .wmlc
AddType application/vnd.wap.wmlscr
<Location /whm-server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
# SUEXEC is supported
Include "/usr/local/apache/conf/in
Include "/usr/local/apache/conf/in
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
NameVirtualHost 464646464
NameVirtualHost *
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
<VirtualHost :80>
ServerName s1.
DocumentRoot /usr/local/apache/htdocs
ServerAdmin
UserDir disable
</VirtualHost>
# Default vhost for unbound IPs
<VirtualHost *>
ServerName s1.
DocumentRoot /usr/local/apache/htdocs
ServerAdmin @gmail.com
UserDir disable
</VirtualHost>
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
<VirtualHost **********:80>
ServerName********.com
ServerAlias www.
DocumentRoot /home/******/public_html
ServerAdmin webmaster@j
UseCanonicalName Off
CustomLog /usr/local/apache/domlogs/
CustomLog /usr/local/apache/domlogs/
## User ******* # Needed for Cpanel::ApacheConf
UserDir disabled
UserDir enabled *******
<IfModule !mod_disable_suexec.c>
SuexecUserGroup ******* *******
</IfModule>
ScriptAlias /cgi-bin/ /home/********/public_html
Include "/usr/local/apache/conf/us
</VirtualHost>
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
<VirtualHost *************80>
ServerName blog
ServerAlias www.
DocumentRoot /home/*******/public_html/
ServerAdmin webmaster@
UseCanonicalName Off
CustomLog /usr/local/apache/domlogs/
CustomLog /usr/local/apache/domlogs/
## User******** # Needed for Cpanel::ApacheConf
UserDir disabled
UserDir enabled *****
<IfModule concurrent_php.c>
php4_admin_value open_basedir "/home/jgnr396:/usr/lib/ph
php5_admin_value open_basedir "/home/jgnr396:/usr/lib/ph
</IfModule>
<IfModule !concurrent_php.c>
<IfModule mod_php4.c>
php_admin_value open_basedir "/home/jgnr396:/usr/lib/ph
</IfModule>
<IfModule mod_php5.c>
php_admin_value open_basedir "/home/jgnr396:/usr/lib/ph
<IfModule mod_php5.c>
php_admin_value open_basedir "/home/jgnr396:/usr/lib/ph
</IfModule>
<IfModule sapi_apache2.c>
php_admin_value open_basedir "/home/jgnr396:/usr/lib/ph
</IfModule>
</IfModule>
<IfModule !mod_disable_suexec.c>
SuexecUserGroup ***** ******
</IfModule>
ScriptAlias /cgi-bin/ /home/*****/public_html/bl
# To customize this VirtualHost use an include file at the following location
# Include "/usr/local/apache/conf/us
</VirtualHost>
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
# SSL
<IfDefine SSL>
</IfDefine>
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
Include "/usr/local/apache/conf/in
Alias /bandwidth/ /usr/local/bandmin/htdocs/
Alias /sys_cpanel/ /usr/local/cpanel/sys_cpan
Alias /java-sys/ /usr/local/cpanel/java-sys
Alias /img-sys/ /usr/local/cpanel/img-sys/
Alias /akopia/ /usr/local/cpanel/3rdparty
Alias /neo-images/ /usr/local/cpanel/base/neo
Alias /mailman/archives/ /usr/local/cpanel/3rdparty
Alias /pipermail/ /usr/local/cpanel/3rdparty
Alias /interchange/ /usr/local/cpanel/3rdparty
Alias /interchange-5/ /usr/local/cpanel/3rdparty
ScriptAlias /cgi-sys/ /usr/local/cpanel/cgi-sys/
ScriptAlias /mailman/ /usr/local/cpanel/3rdparty
ScriptAliasMatch ^/?cpanel/?$ /usr/local/cpanel/cgi-sys/
ScriptAliasMatch ^/?securecpanel/?$ /usr/local/cpanel/cgi-sys/
ScriptAliasMatch ^/?kpanel/?$ /usr/local/cpanel/cgi-sys/
ScriptAliasMatch ^/?controlpanel/?$ /usr/local/cpanel/cgi-sys/
ScriptAliasMatch ^/?kpanel/?$ /usr/local/cpanel/cgi-sys/
ScriptAliasMatch ^/?controlpanel/?$ /usr/local/cpanel/cgi-sys/
ScriptAliasMatch ^/?securecontrolpanel/?$ /usr/local/cpanel/cgi-sys/
ScriptAliasMatch ^/?webmail/?$ /usr/local/cpanel/cgi-sys/
ScriptAliasMatch ^/?whm/?$ /usr/local/cpanel/cgi-sys/
ScriptAliasMatch ^/?securewhm/?$ /usr/local/cpanel/cgi-sys/
# CPANEL/WHM/WEBMAIL/WEBDISK
<VirtualHost :80 *>
ServerName s1..com
ServerAlias cpanel.* whm.* webmail.* webdisk.*
DocumentRoot /usr/local/apache/htdocs
ServerAdmin @gmail.com
UserDir disable
RewriteEngine On
RewriteCond %{HTTP_HOST} ^cpanel\.
RewriteRule ^/(.*) http://127.0.0.1:2082/$1 [P]
RewriteCond %{HTTP_HOST} ^webmail\.
RewriteRule ^/(.*) http://127.0.0.1:2095/$1 [P]
RewriteCond %{HTTP_HOST} ^whm\.
RewriteRule ^/(.*) http://127.0.0.1:2086/$1 [P]
RewriteCond %{HTTP_HOST} ^webdisk\.
RewriteRule ^/(.*) http://127.0.0.1:2077/$1 [P]
UseCanonicalName Off
</VirtualHost>
Include "/usr/local/apache/conf/in
Include "/usr/local/apache/conf/in
It should look something like that. According to the documentation thats all you will need to do.
Include "/usr/local/apache/conf/includes/pre_main_global.conf"
Include "/usr/local/apache/conf/includes/pre_main_2.conf"
RLimitMEM 470370986
RLimitCPU 240
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Direct modifications to the Apache configuration file may be lost upon subsequent regeneration of the #
# configuration file. To have modifications retained, all modifications must be checked into the #
# configuration system by running: #
# /usr/local/cpanel/bin/apache_conf_distiller --update #
# To see if your changes will be conserved, regenerate the Apache configuration file by running: #
# /usr/local/cpanel/bin/build_apache_conf #
# and check the configuration file for your alterations. If your changes have been ignored, then they will #
# need to be added directly to their respective template files. #
# #
# It is also possible to add custom directives to the various "Include" files loaded by this httpd.conf #
# For detailed instructions on using Include files and the apache_conf_distiller with the new configuration #
# system refer to the documentation at: http://www.cpanel.net/support/docs/ea/ea3/customdirectives.html #
# #
# This configuration file was built from the following templates: #
# /var/cpanel/templates/apache2/main.default #
# /var/cpanel/templates/apache2/main.local #
# /var/cpanel/templates/apache2/vhost.default #
# /var/cpanel/templates/apache2/vhost.local #
# /var/cpanel/templates/apache2/ssl_vhost.default #
# /var/cpanel/templates/apache2/ssl_vhost.local #
# #
# Templates with the '.local' extension will be preferred over templates with the '.default' extension. #
# The only template updated by the apache_conf_distiller is main.default. #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#FastCGI
LoadModule fcgid_module modules/mod_fcgid.so
<Directory /usr/local/apache2/htdocs/php>
SetHandler fcgid-script
FCGIWrapper /usr/local/bin/php .php
# You need mod_fcgid version >= 2.1 to support arguments in FCGIWrapper, if you want
# FCGIWrapper "/usr/local/bin/php -c /etc/" .php
Options ExecCGI
allow from all
</Directory>
LoadModule perl_module modules/mod_perl.so
#LoadModule bwlimited_module modules/mod_bwlimited.so
Include "/usr/local/apache/conf/php.conf"
Include "/usr/local/apache/conf/modsec2.conf"
ErrorLog "logs/error_log"
DefaultType text/plain
AddType text/html .shtml
KeepAlive On
KeepAliveTimeout 5
MaxKeepAliveRequests 100
LimitRequestBody 272629760
ServerTokens Prod
<Directory "/">
Options All
AllowOverride All
</Directory>
<Directory "/usr/local/apache/htdocs">
Options Includes None
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
AllowOverride None
Satisfy All
</Directory>
<Files ~ "^error_log$">
Order allow,deny
Deny from all
Satisfy All
</Files>
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
CustomLog "logs/access_log" common
<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
</IfModule>
<Directory "/usr/local/apache/cgi-bin">
AllowOverride None
Options None
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Satisfy All
</Directory>
<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
</IfModule>
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Direct modifications to the Apache configuration file may be lost upon subsequent regeneration of the #
# configuration file. To have modifications retained, all modifications must be checked into the #
# configuration system by running: #
# /usr/local/cpanel/bin/apache_conf_distiller --update #
# To see if your changes will be conserved, regenerate the Apache configuration file by running: #
# /usr/local/cpanel/bin/build_apache_conf #
# and check the configuration file for your alterations. If your changes have been ignored, then they will #
# need to be added directly to their respective template files. #
# #
# It is also possible to add custom directives to the various "Include" files loaded by this httpd.conf #
# For detailed instructions on using Include files and the apache_conf_distiller with the new configuration #
# system refer to the documentation at: http://www.cpanel.net/support/docs/ea/ea3/customdirectives.html #
# #
# This configuration file was built from the following templates: #
# /var/cpanel/templates/apache2/main.default #
# /var/cpanel/templates/apache2/main.local #
# /var/cpanel/templates/apache2/vhost.default #
# /var/cpanel/templates/apache2/vhost.local #
# /var/cpanel/templates/apache2/ssl_vhost.default #
# /var/cpanel/templates/apache2/ssl_vhost.local #
# #
# /var/cpanel/templates/apache2/ssl_vhost.local #
# #
# Templates with the '.local' extension will be preferred over templates with the '.default' extension. #
# The only template updated by the apache_conf_distiller is main.default. #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
PidFile logs/httpd.pid
LockFile logs/accept.lock
# Defined in /var/cpanel/cpanel.config: apache_port
Listen 0.0.0.0:80
Timeout 4650
User nobody
Group nobody
ExtendedStatus On
ServerAdmin
ServerName
LogLevel warn
ServerSignature Off
RewriteMap LeechProtect prg:/usr/local/cpanel/bin/leechprotect
RewriteLock /usr/local/apache/logs/rewrite_lock
UserDir public_html
# DirectoryIndex is set via the WHM -> Service Configuration -> Apache Setup -> DirectoryIndex Priority
DirectoryIndex index.html.var index.htm index.html index.shtml index.xhtml index.wml index.perl index.pl index.plx index.ppl index.cgi index.$
SSLPassPhraseDialog builtin
SSLSessionCache dbm:/usr/local/apache/logs/ssl_scache
SSLSessionCacheTimeout 300
SSLMutex file:/usr/local/apache/logs/ssl_mutex
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
<IfDefine SSL>
# Defined in /var/cpanel/cpanel.config: apache_ssl_port
Listen 0.0.0.0:443
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
</IfDefine>
AddHandler cgi-script .cgi .pl .plx .ppl .perl
AddHandler server-parsed .shtml
AddType text/html .shtml
AddHandler server-parsed .shtml
AddType text/html .shtml
AddType application/x-tar .tgz
AddType text/vnd.wap.wml .wml
AddType image/vnd.wap.wbmp .wbmp
AddType text/vnd.wap.wmlscript .wmls
AddType application/vnd.wap.wmlc .wmlc
AddType application/vnd.wap.wmlscriptc .wmlsc
<Location /whm-server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
# SUEXEC is supported
Include "/usr/local/apache/conf/includes/pre_virtualhost_global.conf"
Include "/usr/local/apache/conf/includes/pre_virtualhost_2.conf"
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
NameVirtualHost 464646464
NameVirtualHost *
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
<VirtualHost :80>
ServerName s1.
DocumentRoot /usr/local/apache/htdocs
ServerAdmin
UserDir disable
</VirtualHost>
# Default vhost for unbound IPs
<VirtualHost *>
ServerName s1.
DocumentRoot /usr/local/apache/htdocs
ServerAdmin @gmail.com
UserDir disable
</VirtualHost>
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
<VirtualHost **********:80>
ServerName********.com
ServerAlias www.
DocumentRoot /home/******/public_html
ServerAdmin webmaster@j
UseCanonicalName Off
CustomLog /usr/local/apache/domlogs/ combined
CustomLog /usr/local/apache/domlogs/-bytes_log "%{%s}t %I .\n%{%s}t %O ."
## User ******* # Needed for Cpanel::ApacheConf
UserDir disabled
UserDir enabled *******
<IfModule !mod_disable_suexec.c>
SuexecUserGroup ******* *******
</IfModule>
ScriptAlias /cgi-bin/ /home/********/public_html/cgi-bin/
Include "/usr/local/apache/conf/userdata/std/2/*********/************.com/*.conf"
</VirtualHost>
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
<VirtualHost *************80>
ServerName blog
ServerAlias www.
DocumentRoot /home/*******/public_html/blog
ServerAdmin webmaster@
UseCanonicalName Off
CustomLog /usr/local/apache/domlogs/blog..com combined
CustomLog /usr/local/apache/domlogs/blog..com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
## User******** # Needed for Cpanel::ApacheConf
UserDir disabled
UserDir enabled *****
<IfModule concurrent_php.c>
php4_admin_value open_basedir "/home/jgnr396:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
php5_admin_value open_basedir "/home/jgnr396:/usr/lib/php:/usr/local/lib/php:/tmp"
</IfModule>
<IfModule !concurrent_php.c>
<IfModule mod_php4.c>
php_admin_value open_basedir "/home/jgnr396:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
</IfModule>
<IfModule mod_php5.c>
php_admin_value open_basedir "/home/jgnr396:/usr/lib/php:/usr/local/lib/php:/tmp"
<IfModule mod_php5.c>
php_admin_value open_basedir "/home/jgnr396:/usr/lib/php:/usr/local/lib/php:/tmp"
</IfModule>
<IfModule sapi_apache2.c>
php_admin_value open_basedir "/home/jgnr396:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
</IfModule>
</IfModule>
<IfModule !mod_disable_suexec.c>
SuexecUserGroup ***** ******
</IfModule>
ScriptAlias /cgi-bin/ /home/*****/public_html/blog/cgi-bin/
# To customize this VirtualHost use an include file at the following location
# Include "/usr/local/apache/conf/userdata/std/2/jgnr396/blog..com/*.conf"
</VirtualHost>
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
# SSL
<IfDefine SSL>
</IfDefine>
# DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
Include "/usr/local/apache/conf/includes/errordocument.conf"
Alias /bandwidth/ /usr/local/bandmin/htdocs/
Alias /sys_cpanel/ /usr/local/cpanel/sys_cpanel/
Alias /java-sys/ /usr/local/cpanel/java-sys/
Alias /img-sys/ /usr/local/cpanel/img-sys/
Alias /akopia/ /usr/local/cpanel/3rdparty/interchange/share/akopia/
Alias /neo-images/ /usr/local/cpanel/base/neomail/neo-images/
Alias /mailman/archives/ /usr/local/cpanel/3rdparty/mailman/archives/public/
Alias /pipermail/ /usr/local/cpanel/3rdparty/mailman/archives/public/
Alias /interchange/ /usr/local/cpanel/3rdparty/interchange/share/interchange/
Alias /interchange-5/ /usr/local/cpanel/3rdparty/interchange/share/interchange-5/
ScriptAlias /cgi-sys/ /usr/local/cpanel/cgi-sys/
ScriptAlias /mailman/ /usr/local/cpanel/3rdparty/mailman/cgi-bin/
ScriptAliasMatch ^/?cpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAliasMatch ^/?securecpanel/?$ /usr/local/cpanel/cgi-sys/sredirect.cgi
ScriptAliasMatch ^/?kpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAliasMatch ^/?controlpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAliasMatch ^/?kpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAliasMatch ^/?controlpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAliasMatch ^/?securecontrolpanel/?$ /usr/local/cpanel/cgi-sys/sredirect.cgi
ScriptAliasMatch ^/?webmail/?$ /usr/local/cpanel/cgi-sys/wredirect.cgi
ScriptAliasMatch ^/?whm/?$ /usr/local/cpanel/cgi-sys/whmredirect.cgi
ScriptAliasMatch ^/?securewhm/?$ /usr/local/cpanel/cgi-sys/swhmredirect.cgi
# CPANEL/WHM/WEBMAIL/WEBDISK PROXY SUBDOMAINS
<VirtualHost :80 *>
ServerName s1..com
ServerAlias cpanel.* whm.* webmail.* webdisk.*
DocumentRoot /usr/local/apache/htdocs
ServerAdmin @gmail.com
UserDir disable
RewriteEngine On
RewriteCond %{HTTP_HOST} ^cpanel\.
RewriteRule ^/(.*) http://127.0.0.1:2082/$1 [P]
RewriteCond %{HTTP_HOST} ^webmail\.
RewriteRule ^/(.*) http://127.0.0.1:2095/$1 [P]
RewriteCond %{HTTP_HOST} ^whm\.
RewriteRule ^/(.*) http://127.0.0.1:2086/$1 [P]
RewriteCond %{HTTP_HOST} ^webdisk\.
RewriteRule ^/(.*) http://127.0.0.1:2077/$1 [P]
UseCanonicalName Off
</VirtualHost>
Include "/usr/local/apache/conf/includes/post_virtualhost_global.conf"
Include "/usr/local/apache/conf/includes/post_virtualhost_2.conf"
Check line 32 to 44
ASKER
Ok attempting install will update..........
ASKER
Ok I get 500 Error on the website and
This in apache logs
www.site.com/index.php exit(communication error), get unexpected signal 11
Or
exit(communication error), terminated by calling exit(), return code: 117
This in apache logs
www.site.com/index.php exit(communication error), get unexpected signal 11
Or
exit(communication error), terminated by calling exit(), return code: 117
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.