How to enable apachectl on server

ARUN Posted in HTTPD
0

PLESK :

Go to httpd.conf

vi /etc/httpd/conf/httpd.conf

ExtendedStatus On

<Location /server-status>
    SetHandler server-status
#    Order deny,allow
#    Deny from all
#    Allow from .example.com
</Location>

It will show IP/server-status

How does ip/~username work in server

ARUN Posted in HTTPD, WHM BACKEND, WHM FRONTEND
0

How does ip/~username point to public_html instead of /home/username in server.

Solution : Its done by “UserDir”

httpd.conf might have an entry as below :

=================

[email protected] [~]# grep UserDir /usr/local/apache/conf/httpd.conf
UserDir public_html
[email protected] [~]#
=========================
Thats what is specifying the document root.
By default "UserDir" is enabled.
To disable we can use :
UserDir disabled user4 user5 user6
http://httpd.apache.org/docs/2.0/mod/mod_userdir.html

How to update apache in direct admin 2.x

ARUN Posted in DIRECT ADMIN, HTTPD
0

Take backup of /etc/httpd and php.ini to be on safer side.

cd /usr/local/directadmin/custombuild
./build update
./build apache

If everything works fine dont rebuild php as that can give some errors
./build php n 

checking for icu-config... no
checking for location of ICU headers and libraries... not found
configure: error: Unable to detect ICU prefix or no failed. Please verify ICU install prefix and make sure icu-config works.

*** There was an error while trying to configure php. Check the custom/suphp/configure.php6 file

How to fix 500 error

ARUN Posted in HTTPD
0

see if httpd.conf has

Remove   RLIMITMem  and check if that will work.

 

 

How to configure mod_proxy in cpanel server

ARUN Posted in HTTPD, Proxy, WHM BACKEND
0

You can enable mod_proxy using easy apache.

To allow a specif IP address only to access that proxy use the below in httpd.conf

<IfModule mod_proxy.c>
ProxyRequests On
<Proxy *>
Order deny,allow
Deny from all
Allow from YOUR_IP_ADDRESS<— Added for testing purpose
Allow from YOUR_IP_ADDRESS <— Added for testing purpose
Allow from YOUR_IP_ADDRESS
</Proxy>
ProxyVia On
</IfModule>

Httpd wont start in direct admin and gives the error :

ARUN Posted in DIRECT ADMIN, HTTPD
0

While trying to start httpd : in direct admin :

# /etc/init.d/httpd start
Starting httpd: Syntax error on line 30 of /usr/local/directadmin/data/users/clickalist/httpd.conf:
Invalid command ‘php_admin_flag’, perhaps misspelled or defined by a module not included in the server configuration

Solution :

./build all d
Back up any file named  /usr/local/directadmin/custombuild/.custombuild.
./build rewrite_confs

Worker and Prefork

ARUN Posted in HTTPD
0

Worker MPM uses multiple child processes. It’s multi-threaded within each child and each thread handles a single connection.

Worker is fast and highly scalable and the memory footprint is comparatively low. It’s well suited for multiple processors. On the other hand, worker is less tolerant to faulty modules and faulty threads can affect all the threads in a child process.

How to check if apache is working as WORKER or PREFORK in WHM server

ARUN Posted in HTTPD
0
[email protected]r [~]# httpd -V | grep MPM
Server MPM:     Prefork
-D APACHE_MPM_DIR=”server/mpm/prefork”

WordPress MU giving Internal Server errorr : Pemature end of script headers: index.php

ARUN Posted in ERROR, HTTPD
0
===========================================
[Tue Sep 21 12:23:08 2010] [error] [client ] /usr/bin/php: error while loading shared libraries: libz.so.1: failed to map segment from shared object: Cannot allocate memory
[Tue Sep 21 12:23:08 2010] [error] [client ] Premature end of script headers: index.php

[Tue Sep 21 12:23:08 2010] [error] [client ] /usr/bin/php: error while loading shared libraries: libz.so.1: failed to map segment from shared object: Cannot allocate memory[Tue Sep 21 12:23:08 2010] [error] [client ] Premature end of script headers: index.php

============================================

Sotution :   Please make sure that you have commented the following entries in httpd.conf

# RLimitMEM

# RLimitCPU

Restart httpd and site will be up.

Solution 2

Check the size of error_log and if its higher than 2GB clear those.

Apache last restart time

ARUN Posted in HTTPD
0

[email protected] [~]# /etc/init.d/httpd status | grep Restart
Restart Time: Monday, 13-Sep-2010 14:56:30 IST
[email protected] [~]#

How to find the httpd uptime

ARUN Posted in HTTPD, LINUX COMMANDS
0

Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80 + httpd wont start

ARUN Posted in HTTPD
0

Problem and SOLUTION explained below :

[[email protected]]# /etc/init.d/httpd start
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[FAILED]
[[email protected]]# fuser -k -n tcp 80
80/tcp: 19594
[[email protected]]# /etc/init.d/httpd start
Starting httpd: [ OK ]
[[email protected]]#

Running easy apache status

ARUN Posted in HTTPD, WHM BACKEND
0

pstree -apuc | grep easy

ll /proc/22013/fd

tail -f /usr/local/cpanel/logs/easy/apache/build.1269862294

How to check if modevasive is installed

ARUN Posted in HTTPD
0

[[email protected] ]  httpd -M | grep evasive
evasive20_module (shared)
Syntax OK
[[email protected]]

OR

[email protected] []# cat /usr/local/apache/conf/httpd.conf | grep mod_evas
LoadModule evasive20_module modules/mod_evasive20.so
[email protected] []#

How to check if mod_security is installed

ARUN Posted in HTTPD
0

cd /usr/local/apache/conf/