How I Know What Changes Was Done In File(httpd.conf)

Hi ,

i am working in linux last 6 month. and i want to now that i have a apache server and some one has change some line in httpd.conf yesterday or day before yesterday how i know what change was done in this file on which date.anyone can help


Regards
Charles


Similar Content



Syntax Error: Unexpected End Of File

Hi!
I wrote a script shell about changing IP of the httpd.conf from text file and saving a new httpd.conf file for all IPs in the text file. The code is below, Im using mremote on windows (RHEL Release 5.7), and getting this error:
./script1.sh: line 19: syntax error: unexpected end of file

Please help me about that error. Thanks!

(ps: line 19 is the last line in the code => done < "$filename" )

#!/bin/bash

DATE='date +%Y%m%d_%H:%M:%S'
NAME=httpd_ip_change
EXTENSION=conf
max=10

filename="$1"
while read -r line

for ((i=2; i<=$max; ++i ))

do
touch $NAME$i.$EXTENSION.$DATE

sed "s/<VirtualHost 10.11.92.81:80>/$line/g" ./httpd.conf > $NAME$i.$EXTENSION.$DATE

done < "$filename"

Httpd Server Taking 90% Cpu Usage

Hi,
my server centos 6 32bit, server config. 12core 16gb ram,only http and mysql(innodb).
promble: httpd service taking 90% cpu usage.
below is top command result and my.cnf conf..
some times site hangs.
any solution on this issue

top - 16:11:13 up 6 days, 5:38, 3 users, load average: 31.50, 30.64, 24.67
Tasks: 259 total, 35 running, 224 sleeping, 0 stopped, 0 zombie
Cpu(s): 61.2%us, 7.9%sy, 0.0%ni, 30.5%id, 0.2%wa, 0.1%hi, 0.1%si, 0.0%st
Mem: 15982704k total, 6111196k used, 9871508k free, 365788k buffers
Swap: 6291448k total, 0k used, 6291448k free, 2648472k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1500 apache 20 0 81188 55m 4660 R 47.7 0.4 3:53.51 httpd
1167 apache 20 0 80184 55m 4680 R 36.3 0.4 13:37.91 httpd
942 apache 20 0 86352 61m 4708 R 34.3 0.4 12:59.12 httpd
1157 apache 20 0 84272 59m 4704 R 34.3 0.4 13:04.18 httpd
1307 apache 20 0 86316 60m 4684 R 34.3 0.4 10:33.57 httpd
1363 apache 20 0 80164 55m 4676 R 34.3 0.4 7:07.59 httpd
1386 apache 20 0 86336 60m 4676 R 34.3 0.4 5:58.29 httpd
1620 apache 20 0 80164 54m 4660 R 34.3 0.3 3:01.97 httpd
937 apache 20 0 84084 59m 4712 R 32.4 0.4 13:04.31 httpd
1147 apache 20 0 84260 59m 4696 R 32.4 0.4 12:21.55 httpd
1158 apache 20 0 84084 60m 4688 R 32.4 0.4 12:39.18 httpd
1159 apache 20 0 84288 59m 4696 R 32.4 0.4 13:12.04 httpd

my.cnf conf. file
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
set-variable=max_allowed_packet=100M
set-variable=max_connections=500
set-variable=key_buffer_size=100M
#set-variable=key_buffer_size=64M
set-variable=sort_buffer_size=64M
#set-variable=innodb_buffer_pool_size=32M
set-variable=innodb_buffer_pool_size=1024M
#set-variable=innodb_buffer_pool_size=2048M
#set-variable=table_cache=1024
set-variable=table_cache=256
set-variable=thread_cache_size=16
set-variable=query_cache_size=16M
#set-variable=innodb_log_file_size=100MB
set-variable=interactive_timeout=60
set-variable=wait_timeout=60

How To Host Multiple Websites On Different Ip And Different Ports On Apache Webserver

How to host multiple websites on different ip and different ports On Apache webserver in Centos 5.4.
First I made two domain on two IP :192.168.1.104 and second virtual ip 192.168.1.105.
Open the httpd.conf file and assisn two ports and two ports
vi /etc/httpd/conf/httpd.conf
NameVirtualHost 192.168.1.104:8139
NameVirtualHost 192.168.1.105:8080
<VirtualHost 192.168.1.104:8139>
DocumnetRoot /home/xyz/
serverName xyz.in
</VirtualHost>

<VirtualHost 192.168.1.105:8080>
DocumnetRoot /home/abc/
serverName abc.in
</VirtualHost>

service httpd restart
service dns restart
First One I am getting the website opened but not the second one
Please help me .I can host the website on same ip and different port but unable to host the website on different ip and different port.
DNS is working fine

Apache Virtual Host

Hello geeks,
I am newbie in Linux and practicing configuring Apache httpd.conf file. I am looking to configure virtualhost but, I can not find directives for virtual hosting. any step by step regarding NameVirtualhost directive would be helpful. I am not sure if I need to install additional modules to get it done.
thanks for your help in advance.

-Hassan

How Do I Edit My /etc/httpd/conf.d/phpmyadmin.conf File?

How do I edit my /etc/httpd/conf.d/phpmyadmin.conf file?

Cross Compiling Apache-2.4.12 For Arm

Dear all,

I am trying to cross compile Apache httpd-2.4.12 for ARM, but after solving some errors I arrived to a point where I get an error in the make process that I do not know how to solve it.

I am using apr-1.5.2, apr-util-1.5.4 and PCRE-8.37 which I copied to httpd-2.4.12/srclib/ with the names apr, apr-util and pcre.

For compile htttp I use:
Code:
./configure --prefix='/usr/local/apache' CC=arm-xilinx-linux-gnueabi-gcc --host=arm-xilinx-linux-gnueabi --with-included-apr ac_cv_file__dev_zero="yes" ac_cv_func_setpgrp_void="yes"C ap_cv_void_ptr_lt_long="no" ac_cv_struct_rlimit="yes"

The output is:

make[1]: Entering directory `/home/usr/Xilinx/Software_arm/httpd-2.4.12'
arm-xilinx-linux-gnueabi-gcc -std=gnu99 -g -O2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -I. -I/home/usr/Xilinx/Software_arm/httpd-2.4.12/os/unix -I/home/usr/Xilinx/Software_arm/httpd-2.4.12/include -I/home/usr/Xilinx/Software_arm/httpd-2.4.12/srclib/apr/include -I/home/usr/Xilinx/Software_arm/httpd-2.4.12/srclib/apr-util/include -I/home/usr/Xilinx/Software_arm/httpd-2.4.12/srclib/apr-util/xml/expat/lib -I/home/usr/Xilinx/Software_arm/pcre/include -I/home/usr/Xilinx/Software_arm/httpd-2.4.12/modules/aaa -I/home/usr/Xilinx/Software_arm/httpd-2.4.12/modules/cache -I/home/usr/Xilinx/Software_arm/httpd-2.4.12/modules/core -I/home/usr/Xilinx/Software_arm/httpd-2.4.12/modules/database -I/home/usr/Xilinx/Software_arm/httpd-2.4.12/modules/filters -I/home/usr/Xilinx/Software_arm/httpd-2.4.12/modules/ldap -I/home/usr/Xilinx/Software_arm/httpd-2.4.12/modules/loggers -I/home/usr/Xilinx/Software_arm/httpd-2.4.12/modules/lua -I/home/usr/Xilinx/Software_arm/httpd-2.4.12/modules/proxy -I/home/usr/Xilinx/Software_arm/httpd-2.4.12/modules/session -I/home/usr/Xilinx/Software_arm/httpd-2.4.12/modules/ssl -I/home/usr/Xilinx/Software_arm/httpd-2.4.12/modules/test -I/home/usr/Xilinx/Software_arm/httpd-2.4.12/server -I/home/usr/Xilinx/Software_arm/httpd-2.4.12/modules/arch/unix -I/home/usr/Xilinx/Software_arm/httpd-2.4.12/modules/dav/main -I/home/usr/Xilinx/Software_arm/httpd-2.4.12/modules/generators -I/home/usr/Xilinx/Software_arm/httpd-2.4.12/modules/mappers -c /home/usr/Xilinx/Software_arm/httpd-2.4.12/server/buildmark.c
/home/usr/Xilinx/Software_arm/httpd-2.4.12/srclib/apr/libtool --silent --mode=link arm-xilinx-linux-gnueabi-gcc -std=gnu99 -g -O2 -L/home/usr/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/arm-xilinx-linux-gnueabi/libc/lib -o httpd modules.lo buildmark.o -export-dynamic server/libmain.la modules/core/libmod_so.la modules/http/libmod_http.la server/mpm/event/libevent.la os/unix/libos.la -L/home/usr/Xilinx/Software_arm/pcre/lib -lpcre /home/usr/Xilinx/Software_arm/httpd-2.4.12/srclib/apr-util/libaprutil-1.la /home/usr/Xilinx/Software_arm/httpd-2.4.12/srclib/apr-util/xml/expat/libexpat.la /home/usr/Xilinx/Software_arm/httpd-2.4.12/srclib/apr/libapr-1.la -lrt -lcrypt -ldl
/home/usr/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../lib/gcc/arm-xilinx-linux-gnueabi/4.6.1/../../../../arm-xilinx-linux-gnueabi/bin/ld: server/mpm/event/.libs/libevent.a(event.o): undefined reference to symbol 'pthread_sigmask@@GLIBC_2.4'
/home/usr/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../lib/gcc/arm-xilinx-linux-gnueabi/4.6.1/../../../../arm-xilinx-linux-gnueabi/bin/ld: note: 'pthread_sigmask@@GLIBC_2.4' is defined in DSO /home/usr/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../arm-xilinx-linux-gnueabi/libc/lib/libpthread.so.0 so try adding it to the linker command line
/home/usr/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../arm-xilinx-linux-gnueabi/libc/lib/libpthread.so.0: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[1]: *** [httpd] Error 1
make[1]: Leaving directory `/home/usr/Xilinx/Software_arm/httpd-2.4.12'
make: *** [all-recursive] Error 1

Could anyone please help me? Any suggestion suggestions?
Thanks in advance and best regards.

Apache2 Won't Start

When I type

service apache2 start

I get a message saying:

[....] Starting web server: apache2apache2: Syntax error on line 7 of /etc/apache2/apache2.conf: Could not open configuration file /etc/init.d/apache.conf: No such file or directory
Action 'start' failed.
The Apache error log may have more information.
failed!

The apache error log is blank and doesn't have any information.
Please help me.

How To Solve Scp Ssh Port 22 Error ?

Hi!

Im trying to use scp to copy changed httpd.conf files to 2 remote machines (the script is executed in one machine from remote and the result is copied to the both).

scp -vvv first_machine_name@ip_address:filename \second_machine_name@second_ip_address:/usr/local/apache/conf

Using RHEL 5.7 with mremote in windows 7 im getting this error:

ssh: connect to host <ip address> port 22: Connection refused

How can I solve it ? Thanks.

500 Internal Server Error When Using The Mod_rewrite

Hello.

I have such links in a web site

/post.php?id=14
/cat.php?t=y&cid=6666

and i create an .htaccess file with that content inside.

Code:
Options +FollowSymLinks 
RewriteEngine On 
RewriteRule ^([^/]*)$ /post.php?id=$1 [L] 
RewriteRule ^([^/]*)/([^/]*)$ /cat.php?t=$1&cid=$2 [L]

but on refresh, apache returns 500 Internal server error.

I looked on logs and found that :
Quote:
AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
Why that happens ? Mod_rewrite is enabled in httpd.conf.

Compile Apache 2.2.29

Hi,

I have the following when I run gmake to build apache 2.2.29 in Solaris 10 in SPARC hardwa

:
Undefined first referenced
symbol in file
BIO_set_callback ab.o
BIO_set_callback_arg ab.o
BIO_get_callback_arg ab.o
SSL_CTX_set_info_callback ab.o
ld: fatal: symbol referencing errors. No output written to ab
collect2: ld returned 1 exit status
gmake[2]: *** [ab] Error 1
gmake[2]: Leaving directory `/SSL/httpd-2.2.29/support'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/SSL/httpd-2.2.29/support'
gmake: *** [all-recursive] Error 1
:

I tried the advised from the result of google around but to no avail.

Appreciate if anyone can gives a pointer. Thanks in advance.