Disabling The Cgi Module In Httpd.conf
Jul 21, 2008I like to disable the CGI Module in httpd.conf. Can you please help me to disable the CGI Module.
View 5 RepliesI like to disable the CGI Module in httpd.conf. Can you please help me to disable the CGI Module.
View 5 RepliesTrying to troubleshoot an exploit where the code redirecting people to exploit sites is not in the website. I think a module is being loaded dynamically, but I am not seeing the entry point in the access logs. I restart httpd and the problem goes away temporarily.
Anyone see anything fishy?
==================
HTTPD MODULES
==================
[root@xxx ~]# httpd -L
<Directory (core.c)
Container for directives affecting resources located in the specified directories
Allowed in *.conf only outside <Directory>, <Files> or <Location>
<Location (core.c)
Container for directives affecting resources accessed through the specified URL paths
Allowed in *.conf only outside <Directory>, <Files> or <Location>
<VirtualHost (core.c)
Container to map directives to a particular virtual host, takes one or more host addresses
Allowed in *.conf only outside <Directory>, <Files> or <Location>
<Files (core.c)
Container for directives affecting files matching specified patterns
Allowed in *.conf anywhere and in .htaccess
when AllowOverride isn't None
<Limit (core.c)
Container for authentication directives when accessed using specified HTTP methods
Allowed in *.conf anywhere and in .htaccess
when AllowOverride isn't None
<LimitExcept (core.c)
Container for authentication directives to be applied when any HTTP method other than those specified is used to access the resource
Allowed in *.conf anywhere and in .htaccess
when AllowOverride isn't None
<IfModule (core.c)
Container for directives based on existance of specified modules
Allowed in *.conf anywhere and in .htaccess
when AllowOverride isn't None
<IfDefine (core.c)
Container for directives based on existance of command line defines
Allowed in *.conf anywhere and in .htaccess
when AllowOverride isn't None
<DirectoryMatch (core.c)
Container for directives affecting resources located in the specified directories
Allowed in *.conf only outside <Directory>, <Files> or <Location>
<LocationMatch (core.c)
Container for directives affecting resources accessed through the specified URL paths
Allowed in *.conf only outside <Directory>, <Files> or <Location>
<FilesMatch (core.c)
Container for directives affecting files matching specified patterns
Allowed in *.conf anywhere and in .htaccess
when AllowOverride isn't None
AuthType (core.c)
An HTTP authorization type (e.g., "Basic")
Allowed in *.conf only inside <Directory>, <Files> or <Location> and in .htaccess
when AllowOverride includes AuthConfig
AuthName (core.c)
The authentication realm (e.g. "Members Only")
Allowed in *.conf only inside <Directory>, <Files> or <Location> and in .htaccess
when AllowOverride includes AuthConfig
Require (core.c)
Selects which authenticated users or groups may access a protected space
Allowed in *.conf only inside <Directory>, <Files> or <Location> and in .htaccess
when AllowOverride includes AuthConfig
Satisfy (core.c)
access policy if both allow and require used ('all' or 'any')
Allowed in *.conf only inside <Directory>, <Files> or <Location> and in .htaccess
when AllowOverride includes AuthConfig
AddDefaultCharset (core.c)
The name of the default charset to add to any Content-Type without one or 'Off' to disable
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
AcceptPathInfo (core.c)
Set to on or off for PATH_INFO to be accepted by handlers, or default for the per-handler preference
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
AccessFileName (core.c)
Name(s) of per-directory config files (default: .htaccess)
Allowed in *.conf only outside <Directory>, <Files> or <Location>
DocumentRoot (core.c)
Root directory of the document tree
Allowed in *.conf only outside <Directory>, <Files> or <Location>
ErrorDocument (core.c)
Change responses for HTTP errors
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo
AllowOverride (core.c)
Controls what groups of directives can be configured by per-directory config files
Allowed in *.conf only inside <Directory>, <Files> or <Location>
Options (core.c)
Set a number of attributes for a given directory
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes Options
DefaultType (core.c)
the default MIME type for untypable files
Allowed in *.conf anywhere and in .htaccess
when AllowOverride includes FileInfo...
I have a box: Dual Opteron 248 - 2GB RAM, Centos 4.x, Cpanel / WHM, does anyone can help me set value in httpd.conf for better?
Set "Timeout"
Set "KeepAlive"
Set "KeepAliveTimeout"
Set "MinSpareServers"
Set "MaxSpareServers"
Set "MaxRequestsPerChild"
Set "HostnameLookups"
I've got many emails from cpanel that httpd fail, check in apache logs i cant find any error
I tried that recently to install PHP 4 & PHP 5 on the same server - without any luck, i stumbled into a massive hole.
the existing httpd.conf was replaced and there was a backup made - stupid me accidently deleted this backup file and was left this a non-working copy of httpd.conf - if anyone can help me it would be much appreciated.
root@server1 [~]# /etc/init.d/httpd configtest
Warning: DocumentRoot [/dev/null] does not exist
Syntax OK
I always used httpd.conf to set my virtualhosts and it worked perfect. Untill now.
All domains I point to my IP get's pointed to first virtual host folder. And it doesnt care about other settings. My config:
Code:
<VirtualHost *>
ServerSignature Off
ServerAlias omgwtf.com
ServerAdmin rytis@s.lt
DocumentRoot /var/www
ServerName blahblah.com
Options -Indexes
</VirtualHost>
<VirtualHost *>
ServerSignature Off
ServerAlias blahblah.com
ServerAdmin rytis@z.lt
DocumentRoot /var/www/epo
ServerName blahblah.com
Options -Indexes
</VirtualHost>
And it doesnt care about that I set xyz.com to /var/www/epo, it just loads /var/epo.
I have restarted apache.
I recently updated to apache 2.2 and when I went to check
/usr/local/apache/conf/httpd.conf
I noticed that a lot of the stuff was missing from what I usually see in apache 1.3 Was a new file created when the update was finish? I used easyapache to make the update.
I was actually looking to change the
Keepalive
Timeout
MinSpareServers
MaxSpareServers
MaxRequestsPerChild
Etc...
But it doesn't look like it's in there.
how should I optimize httpd.conf on my server. Apache was set up by my friend, unfortunately it started to "stuck" lately during peak time. Browser is connecting to a website for a long time before it actually starts to load it.
My current setup:
Timeout 300
KeepAlive On
MaxKeepAliveRequests 300
KeepAliveTimeout 15
MinSpareServers 2
MaxSpareServers 5
StartServers 5
ServerLimit 650
MaxClients 650
Server:
Intel Quad-Core Xeon X3220 @ 2.40 GHZ
4x 2GiB Kingston ECC Not-Registred 667Mhz
2x 150GiB RaptorX 10k RPM, sw raid 1
I remember seeing a website/forum where you couldn't post your server stats and httpd.conf settings and experts would give advice on settings you should use.
Does anyone know the url to this site, or site similar to it
my server is centos with whm/cpanel,
i find there are two httpd.conf in my server,
/etc/httpd/conf/httpd.conf
/usr/local/apache/conf/httpd.conf
i want to ask if i want to tune the httpd,
which one i should edit?
and what are the difference of them?
how can i open this setting
safe_mode = Off
allow_url_fopen = On
disable_functions = None
register_globals = On
in one account in httpd.conf file
I am running Plesk 8 Server, RH Linux EL4 3.0GHz 1GB Ram. My httpd.conf setting is as below:
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 150
MaxRequestsPerChild 1000
</IfModule>
best optimized values for my server. My server oftenly goes down due to large number of http processes.
tuning apache configurations, and would like to seek for some opinions on how I should optimize my httpd.conf
The server is primarily for downloads, serving file sizes that are around 100~200MB.
how I should configure my apache so it'll allow a better/faster/more stable environment?
Hardware Specs:
Intel Xeon 3220 Quad-Core (2.4Ghz)
2GB Ram
My current httpd.conf
ServerTokens None
ServerRoot "/etc/httpd"
PidFile run/httpd.pid
Timeout 20
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
##
## Server-Pool Size Regulation (MPM specific)
##
# prefork MPM
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000
</IfModule>
# worker MPM
<IfModule worker.c>
StartServers 4
MaxClients 500
MinSpareThreads 25
MaxSpareThreads 100
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
if these settings are decent for a busy forum, if not what should be changed?
Timeout 25
KeepAlive On
MaxKeepAliveRequests 40
KeepAliveTimeout 10
MinSpareServers 8
MaxSpareServers 20
StartServers 12
MaxClients 150
MaxRequestsPerChild 140
I have around 50-100 members/guests online at a time, with at least 20 robots(Search engine bots) online.
Processor InformationProcessor #1 Vendor: GenuineIntelProcessor #1 Name: Intel(R) Xeon(R) CPU L5335 @ 2.00GHzProcessor #1 speed: 2000.219 MHzProcessor #1 cache size: 4096 KBProcessor #2 Vendor: GenuineIntelProcessor #2 Name: Intel(R) Xeon(R) CPU L5335 @ 2.00GHzProcessor #2 speed: 2000.219 MHzProcessor #2 cache size: 4096 KBProcessor #3 Vendor: GenuineIntelProcessor #3 Name: Intel(R) Xeon(R) CPU L5335 @ 2.00GHzProcessor #3 speed: 2000.219 MHzProcessor #3 cache size: 4096 KBProcessor #4 Vendor: GenuineIntelProcessor #4 Name: Intel(R) Xeon(R) CPU L5335 @ 2.00GHzProcessor #4 speed: 2000.219 MHzProcessor #4 cache size: 4096 KBProcessor #5 Vendor: GenuineIntelProcessor #5 Name: Intel(R) Xeon(R) CPU L5335 @ 2.00GHzProcessor #5 speed: 2000.219 MHzProcessor #5 cache size: 4096 KBProcessor #6 Vendor: GenuineIntelProcessor #6 Name: Intel(R) Xeon(R) CPU L5335 @ 2.00GHzProcessor #6 speed: 2000.219 MHzProcessor #6 cache size: 4096 KBProcessor #7 Vendor: GenuineIntelProcessor #7 Name: Intel(R) Xeon(R) CPU L5335 @ 2.00GHzProcessor #7 speed: 2000.219 MHzProcessor #7 cache size: 4096 KBProcessor #8 Vendor: GenuineIntelProcessor #8 Name: Intel(R) Xeon(R) CPU L5335 @ 2.00GHzProcessor #8 speed: 2000.219 MHzProcessor #8 cache size: 4096 KB
4GB RAM
150G Disk
I cant make php 5.2.1 work as httpd 2.2.4 and 2.2.3 module. When loaded with php it makes httpd dont start at all without any errors in log even on debug level! However when I place php 5.2.0 as module it immediately starts working ok.
I've tested this with a standart ./configure without any parameters for both php and httpd, and httpd is always not working when it tries to load php 5.2.1 as module.
Did someone run php 5.2.1 with httpd >2.2.3 succesfully?
I am using a VPS provided by webkeeprs, and actually my site got quite amount of traffic everyday, sometime when it at peak, by then website won't load, and got blank page.
Check with the resourses used, I only got 256mb in ram, and it always show "RED" and which had consumed 240mb on ram already at peak time.
Here is my setting of my httpd.conf file, I am looking for some expert who may give me a hand on this setting:
=============================================================
ServerTokens ProductOnly
ServerRoot "/etc/httpd"
PidFile run/httpd.pid
Timeout 180
KeepAlive On
MaxKeepAliveRequests 88
KeepAliveTimeout 3
<IfModule prefork.c>
StartServers 15
MinSpareServers 10
MaxSpareServers 20
ServerLimit 100
MaxClients 90
MaxRequestsPerChild 30
</IfModule>
#<IfModule worker.c>
#StartServers 1
#MaxClients 10
#MinSpareThreads 1
#MaxSpareThreads 5
#ThreadsPerChild 1
#MaxRequestsPerChild 0
#</IfModule>
Listen 80
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_alias_module modules/mod_authn_alias.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_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 proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule version_module modules/mod_version.so
Include conf.d/*.conf
ExtendedStatus Off
User apache
Group apache
#ServerAdmin email@msn.com
#ServerName
UseCanonicalName Off
DocumentRoot "/var/www/html"
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<IfModule mod_userdir.c>
UserDir disable
</IfModule>
DirectoryIndex index.html index.html.var index.shtml index.cfm index.php index.htm
AccessFileName .htaccess
For the RLimitCPU directive in httpd.conf
when i set a limit say RLimitCPU 20 30
for a dual core or quad core, does that mean 20% of each cpu, so for a dual core its will be 40% total (20% x 2 cpu) or is it 20% total of all cpu?
I'd like to keep an IP blacklist, and have Apache enforce it. Because I want it to apply server-wide, I want to use it in httpd.conf, not .htaccess.
Rather than constantly editing httpd.conf by hand, I'd like to keep a file of IPs, and have Apache read that file and use it as the argument for a "deny from..." directive. Try as I might, I cannot find any documentation, nor any examples, of this usage. Is this something that's possible?
(It turns out that Apache doesn't honor /etc/hosts.deny, hence this question.)
I can see that httpd is running, but I can't see it in xinetd.conf file or /etc/xinit.d/ directory.
Don't need to be in one of the configuration file?
Given that I am using cpanel, is there a way to modify httpd.conf so I can enable mod proxy without having to do it directly?
This is what I am instructed to do.
Quote:
Have you checked you have mod_proxy enabled? To enable mod_proxy uncomment it's LoadModule line in the httpd.conf file. You may have to ask your host.
is it possible to set the disabled functions list for PHP in apache's HTTPD.conf per virtual host? i want a bunch of functions disabled for everyone except the default host (me).
I tried the php_admin_value way and when i look at phpinfo() it shows that the master is disabled and the local is not disabled (exactly what i want) but they arnt actually enabled for me
I have a linux vps with 384mb dedicated and 1GB burst RAM. I am using it to host phproxy web proxy sites. Can you please recommend good values for the following Apache/1.3.37 httpd.conf settings?
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 2
MinSpareServers 32
MaxSpareServers 64
StartServers 8
MaxClients 256
MaxRequestsPerChild 500
I 'd like to enable php function "mail" via directive for specific account in httpd.conf
what's directive syntax for it,
I am having a problem on my VPS. I am running the latest version of Apache on Windows Server 2K3, and after editing httpd.conf to allow virtual hosts (#Include /conf/extra/httpd-vhosts.conf) and trying to restart the service, an error appears saying the operation failed.
I have even tried restarting/starting the service via services.msc
If I am not using the default httpd.conf Apache will not restart at all... it is very strange. I have also tried doing a repair of the installation of Apache.
I am running into a problem with my home linux server running Fedora 8 (2.6.26.6-49.fc8). The problem is with my SSH sessions, in that they hang or freeze when I try to run certain commands such as (ps -auxt or top) or when trying to edit (/etc/httpd/conf/httpd.conf) via VI or Pico. I am able to edit my pure-ftpd.conf file with little to no trouble through either Vi or Pico however. I did some research already on openssh.org but my problem does not resemble the tcp timeout issues I've seen described. When the SSH session hangs I'm forced to disconnect and then reconnect. Just curious if anyone has any ideas as to what I can try to resolve this problem.
View 12 Replies View RelatedAdded this in the httpd.conf but it is still pointing to the main domain xxxx.com
--------------
<VirtualHost *:80>
DocumentRoot /xxx/xxx/webmail
ServerName webmail.xxxxx.com
</VirtualHost>
-----------------
whenever i type webmail.xxxxx.com, it will see the content of xxxxx.com.
My Dedicated server is being slow - hopefully someone can give a helping hand
Processor: AMD Single CPU Dual Core Athlon 4200
Memory: 2048MB RAM
Primary Hard Drive: 160GB
Operating System : CentOS 4.x X86_64 Bit
Control Panel: CPanel
uplink port: 100
Apache version 1.3.37
php 4.4.4
When cpanel edit the httpd.conf(to add subdomain/domain/etc) made a wrong.
In the lines
BytesLog /usr/local/apache/domlogs/domainorsubdomainname.com-bytes_log
CustomLog /usr/local/apache/domlogs/domainorsubdomainname.com combined
it breaks them as follows
--
BytesLog /usr/local/apache/domlogs/domainorsubdomainname.com
-bytes_log
CustomLog /usr/local/apache/domlogs/domainorsubdomainname.com
combined
And httpd cannot start and failed.
Is there any way to reset it ?
View 2 Replies View Relatedto install mod_evasive module on our Apache2 that runs on Fedora server. However, for that we need Apache's apxs to compile it. We found out that we can do that by running the
yum install httpd-devel
However, when we run that, we get the following:
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
httpd-devel i386 2.2.8-1.fc7 updates 144 k
Updating:
httpd i386 2.2.8-1.fc7 updates 1.0 M
openldap i386 2.3.34-7.fc7 updates 291 k
Installing for dependencies:
apr-devel i386 1.2.8-6 fedora 170 k
apr-util-devel i386 1.2.10-1.fc7 updates 54 k
cyrus-sasl-devel i386 2.1.22-8.fc7 updates 351 k
db4-devel i386 4.5.20-5.fc7 fedora 2.3 M
expat-devel i386 1.95.8-9 fedora 129 k
openldap-devel i386 2.3.34-7.fc7 updates 1.5 M
Updating for dependencies:
httpd-manual i386 2.2.8-1.fc7 updates 821 k
mod_ssl i386 1:2.2.8-1.fc7 updates 85 k
openldap-clients i386 2.3.34-7.fc7 updates 179 k
Transaction Summary
==========================================
Install 7 Package(s)
Update 5 Package(s)
Remove 0 Package(s)
Total download size: 7.0 M
We're kind of cautios, because we have never updated Apache on our live server. We'd prefer if we could download and install just the httpd-devel module. Is this possible?
If not, would this mess up any of our existing configuration? Could we expect any problems? And do we need to shut Apache down, then run the updates and only then restart it?
So why does it still say Connection: Keep-Alive? I know that if its off, it should say Connection: Closed. And where did the timeout=1 and max=100 come from?
My httpd.conf
Timeout 90
KeepAlive Off
KeepAliveTimeout 15
KeepAliveRequests 10
HTTP headers is reporting
Keep-Alive: timeout=1, max=100
Connection: Keep-Alive