LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-03-2012, 12:04 PM   #1
windstory
Member
 
Registered: Nov 2008
Posts: 489

Rep: Reputation: 36
mod_auth_basic.so: cannot open


My box is scientific linux x64 6.2.

I've installed apache,mysq,php, and start apche, but failed.

Quote:
[root@linux Documents]# service httpd configtest
httpd: Syntax error on line 32 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_auth_basic.so into server: /etc/httpd/modules/mod_auth_basic.so: cannot open shared object file: No such file or directory
[root@linux Documents]# locate mod_auth_basic.so/
/usr/lib64/httpd/modules/mod_auth_basic.so
please let me know how to resolve this problem.

Thanks in advance.
 
Old 04-03-2012, 03:11 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

In RHEL based distros (like scientific linux) /etc/httpd/modules is a symlink for /usr/lib64/httpd/modules, so check if the symlink exists, or you have to re-create it

Regards
 
1 members found this post helpful.
Old 04-03-2012, 09:10 PM   #3
windstory
Member
 
Registered: Nov 2008
Posts: 489

Original Poster
Rep: Reputation: 36
bathory/

I'm very please to meet you again. I remember your kind help about dns settings, and whenever I re-install linux I check your guide.

Quote:
[root@linux Documents]# cd /etc/httpd
[root@linux httpd]# ll
total 12
drwxr-xr-x. 2 root root 4096 Apr 2 14:47 alias
drwxr-xr-x. 2 root root 4096 Mar 27 12:58 conf
drwxr-xr-x. 2 root root 4096 Mar 27 00:13 conf.d
lrwxrwxrwx. 1 root root 19 Apr 3 12:36 logs -> ../../var/log/httpd
lrwxrwxrwx. 1 root root 19 Apr 3 12:36 run -> ../../var/run/httpd
[root@linux httpd]# ln -s /etc/httpd/modules /usr/lib64/httpd/modules
ln: creating symbolic link `/usr/lib64/httpd/modules/modules': File exists
Quote:
ln -s /etc/httpd/modules /usr/lib64/httpd/modules
Is this right?

Last edited by windstory; 04-03-2012 at 11:32 PM.
 
Old 04-04-2012, 12:17 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi windstory,


Quote:
ln -s /etc/httpd/modules /usr/lib64/httpd/modules
Is this right?
You should do the symlink the other way around.
Code:
ln -s /usr/lib64/httpd/modules /etc/httpd
Cheers mate
 
1 members found this post helpful.
Old 04-04-2012, 12:32 AM   #5
windstory
Member
 
Registered: Nov 2008
Posts: 489

Original Poster
Rep: Reputation: 36
I've re-installed httpd, but there is 2 problems.

1. When removing httpd, there are several modules, but at reinstalling there is nothing.
Quote:
[root@linux etc]# yum remove httpd
............
Dependencies Resolved
==================================================================================================== ==========
Package Arch Version Repository Size
==================================================================================================== ==========
Removing:
httpd x86_64 2.2.15-15.sl6.1 @sl-security 2.9 M
Removing for dependencies:
gnome-user-share x86_64 2.28.2-3.el6 @anaconda-ScientificLinux-201202031552.x86_64 1.1 M
httpd-manual noarch 2.2.15-15.sl6.1 @sl-security 3.5 M
mod_auth_kerb x86_64 5.4-6.el6.0.sl6 @anaconda-ScientificLinux-201202031552.x86_64 44 k
mod_auth_mysql x86_64 1:3.0.0-11.el6_0.1 @anaconda-ScientificLinux-201202031552.x86_64 49 k
mod_auth_pgsql x86_64 2.0.3-10.1.el6 @anaconda-ScientificLinux-201202031552.x86_64 61 k
mod_authz_ldap x86_64 0.26-15.el6 @anaconda-ScientificLinux-201202031552.x86_64 197 k
mod_perl x86_64 2.0.4-10.el6 @anaconda-ScientificLinux-201202031552.x86_64 6.1 M
mod_ssl x86_64 1:2.2.15-15.sl6.1 @sl-security 183 k
mod_wsgi x86_64 3.2-1.el6 @anaconda-ScientificLinux-201202031552.x86_64 175 k
php x86_64 5.3.3-3.el6_2.6 @sl-security 3.5 M
webalizer x86_64 2.21_02-3.3.el6 @anaconda-ScientificLinux-201202031552.x86_64 324 k

Transaction Summary
==================================================================================================== ==========
Remove 12 Package(s)
Installed size: 18 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : httpd-manual-2.2.15-15.sl6.1.noarch 1/12
Erasing : mod_wsgi-3.2-1.el6.x86_64 2/12
Erasing : mod_authz_ldap-0.26-15.el6.x86_64 3/12
Erasing : mod_auth_pgsql-2.0.3-10.1.el6.x86_64 4/12
Erasing : webalizer-2.21_02-3.3.el6.x86_64 5/12
Erasing : mod_auth_kerb-5.4-6.el6.0.sl6.x86_64 6/12
Erasing : 1:mod_auth_mysql-3.0.0-11.el6_0.1.x86_64 7/12
Erasing : 1:mod_ssl-2.2.15-15.sl6.1.x86_64 8/12
Erasing : php-5.3.3-3.el6_2.6.x86_64 9/12
Erasing : gnome-user-share-2.28.2-3.el6.x86_64 10/12
Erasing : mod_perl-2.0.4-10.el6.x86_64 11/12
Erasing : httpd-2.2.15-15.sl6.1.x86_64 12/12
warning: /etc/httpd/conf/httpd.conf saved as /etc/httpd/conf/httpd.conf.rpmsave

Removed:
httpd.x86_64 0:2.2.15-15.sl6.1

Dependency Removed:
gnome-user-share.x86_64 0:2.28.2-3.el6 httpd-manual.noarch 0:2.2.15-15.sl6.1
mod_auth_kerb.x86_64 0:5.4-6.el6.0.sl6 mod_auth_mysql.x86_64 1:3.0.0-11.el6_0.1
mod_auth_pgsql.x86_64 0:2.0.3-10.1.el6 mod_authz_ldap.x86_64 0:0.26-15.el6
mod_perl.x86_64 0:2.0.4-10.el6 mod_ssl.x86_64 1:2.2.15-15.sl6.1
mod_wsgi.x86_64 0:3.2-1.el6 php.x86_64 0:5.3.3-3.el6_2.6
webalizer.x86_64 0:2.21_02-3.3.el6

Complete!
[root@linux etc]# yum -y install httpd
.......
==================================================================================================== ==========
Package Arch Version Repository Size
==================================================================================================== ==========
Installing:
httpd x86_64 2.2.15-15.sl6.1 sl-security 812 k

Transaction Summary
==================================================================================================== ==========
Install 1 Package(s)

Total download size: 812 k
Installed size: 2.9 M
Downloading Packages:
httpd-2.2.15-15.sl6.1.x86_64.rpm | 812 kB 00:02
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : httpd-2.2.15-15.sl6.1.x86_64 1/1

Installed:
httpd.x86_64 0:2.2.15-15.sl6.1

Complete!
2. Could not start httpd, and the /var/log/httpd/error.log is this.
Quote:
[root@linux etc]# service httpd configtest
Syntax OK
[root@linux etc]# /etc/init.d/httpd start
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[FAILED]
Quote:
(13)Permission denied: Couldn't start ErrorLog process
Unable to open logs
 
Old 04-04-2012, 12:53 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
1.
Quote:
1. When removing httpd, there are several modules, but at reinstalling there is nothing.
Looks like installation completed successfully. I don't think yum reports any file being installed. Check if the various apache modules exist in /usr/lib64/httpd/modules.

2.
Quote:
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
This is just a warning. You can set ServerName to something like localhost or www.example.com, so apache stops complaining
Quote:
(13)Permission denied: Couldn't start ErrorLog process
Unable to open logs
What gives:
Code:
ls -ld /var/log/httpd
ls -l /var/log/httpd
 
1 members found this post helpful.
Old 04-04-2012, 01:29 AM   #7
windstory
Member
 
Registered: Nov 2008
Posts: 489

Original Poster
Rep: Reputation: 36
Here is the result.

Quote:
[root@linux etc]# ls -ld /var/log/httpd
drwx------. 2 root root 4096 Apr 4 14:10 /var/log/httpd
[root@linux etc]# ls -l /var/log/httpd
total 4
-rw-r--r--. 1 root root 300 Apr 4 14:27 error_log
 
Old 04-04-2012, 02:04 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by windstory View Post
Here is the result.
Looks good.
What's in /var/log/httpd/error_log?
Also did you check if the modules are installed under /usr/lib64/httpd/modules and there exist the symlink to /etc/httpd/modules?
 
Old 04-04-2012, 02:10 AM   #9
windstory
Member
 
Registered: Nov 2008
Posts: 489

Original Poster
Rep: Reputation: 36
The "/var/log/httpd/error_log" is this.

Quote:
(13)Permission denied: Couldn't start ErrorLog process
Unable to open logs
"/usr/lib64/httpd/modules";

Quote:
[root@linux etc]# ls /usr/lib64/httpd/modules
libmodnss.so mod_authz_default.so mod_dir.so mod_log_forensic.so mod_rewrite.so
mod_actions.so mod_authz_groupfile.so mod_disk_cache.so mod_logio.so mod_setenvif.so
mod_alias.so mod_authz_host.so mod_dnssd.so mod_mime_magic.so mod_speling.so
mod_asis.so mod_authz_owner.so mod_dumpio.so mod_mime.so mod_status.so
mod_auth_basic.so mod_authz_user.so mod_env.so mod_negotiation.so mod_substitute.so
mod_auth_digest.so mod_autoindex.so mod_expires.so mod_proxy_ajp.so mod_suexec.so
mod_authn_alias.so mod_cache.so mod_ext_filter.so mod_proxy_balancer.so modules
mod_authn_anon.so mod_cern_meta.so mod_filter.so mod_proxy_connect.so mod_unique_id.so
mod_authn_dbd.so mod_cgid.so mod_headers.so mod_proxy_ftp.so mod_userdir.so
mod_authn_dbm.so mod_cgi.so mod_ident.so mod_proxy_http.so mod_usertrack.so
mod_authn_default.so mod_dav_fs.so mod_include.so mod_proxy_scgi.so mod_version.so
mod_authn_file.so mod_dav.so mod_info.so mod_proxy.so mod_vhost_alias.so
mod_authnz_ldap.so mod_dbd.so mod_ldap.so mod_reqtimeout.so
mod_authz_dbm.so mod_deflate.so mod_log_config.so mod_rev.so

"ls /etc/httpd";
Quote:
[root@linux httpd]# ll
total 12
drwxr-xr-x. 2 root root 4096 Apr 2 14:47 alias
drwxr-xr-x. 2 root root 4096 Apr 4 14:20 conf
drwxr-xr-x. 2 root root 4096 Apr 4 14:08 conf.d
lrwxrwxrwx. 1 root root 19 Apr 4 14:08 logs -> ../../var/log/httpd
lrwxrwxrwx. 1 root root 29 Apr 4 14:08 modules -> ../../usr/lib64/httpd/modules
lrwxrwxrwx. 1 root root 19 Apr 4 14:08 run -> ../../var/run/httpd
 
Old 04-04-2012, 03:45 AM   #10
windstory
Member
 
Registered: Nov 2008
Posts: 489

Original Poster
Rep: Reputation: 36
I found an error at httpd.confand correct it.

Code:
ErrorLog logs/error_log
But, still error message exist. The "error_log" file is at "/var/log/httpd", but apache searchs at "/etc/httpd/logs".

Quote:
[root@linux Documents]# /etc/init.d/httpd start
Starting httpd: (2)No such file or directory: httpd: could not open error log file /etc/httpd/logs/error_log.
Unable to open logs
[FAILED]
[root@linux Documents]# ls -al /etc/httpd/log
ls: cannot access /etc/httpd/log: No such file or directory
[root@linux Documents]# ls -al /var/log/httpd
total 12
drwx------. 2 root root 4096 Apr 4 14:10 .
drwxr-xr-x. 18 root root 4096 Apr 4 17:09 ..
-rw-r--r--. 1 root root 797 Apr 4 17:21 error_log
[root@linux httpd]# ls -al /etc/httpd
total 28
drwxr-xr-x. 5 root root 4096 Apr 4 17:41 .
drwxr-xr-x. 137 root root 12288 Apr 4 17:07 ..
drwxr-xr-x. 2 root root 4096 Apr 2 14:47 alias
drwxr-xr-x. 2 root root 4096 Apr 4 17:34 conf
drwxr-xr-x. 2 root root 4096 Apr 4 17:21 conf.d
lrwxrwxrwx. 1 root root 19 Apr 4 14:08 logs -> ../../var/log/httpd
lrwxrwxrwx. 1 root root 29 Apr 4 14:08 modules -> ../../usr/lib64/httpd/modules
lrwxrwxrwx. 1 root root 19 Apr 4 14:08 run -> ../../var/run/httpd
 
Old 04-04-2012, 04:07 AM   #11
windstory
Member
 
Registered: Nov 2008
Posts: 489

Original Poster
Rep: Reputation: 36
I changed "ErrorLog" as this,

Code:
ErrorLog logs/error_log
Then;

Quote:
(2)No such file or directory: httpd: could not open error log file /usr/sbin/rotatelogs /var/log/httpd/myserver5.test.net_access_log.%Y-%m-%d 86400 +540.
Unable to open logs
Actually there are 5 vhosts in "/etc/httpd/conf.d/vhost.conf", but only "myserver5.test.net" has an error.

The "/etc/httpd/conf.d/vhost.conf" is this;

Code:
<VirtualHost *:80>
ServerAdmin webmaster@server5.net
DocumentRoot /var/www/html/myserver5
ServerName myserver5.test.net
ServerAlias www.myserver5.test.net
CustomLog "/usr/sbin/rotatelogs /var/log/httpd/myserver5.test.net_access_log.%Y-%m-%d 86400 +540" common
ErrorLog "/usr/sbin/rotatelogs /var/log/httpd/myserver5.test.net_error_log.%Y-%m-%d 86400 +540" 
</VirtualHost>
And,
Quote:
[root@linux httpd]# cat logs/error.log
cat: logs/error.log: No such file or directory

Last edited by windstory; 04-04-2012 at 04:11 AM.
 
Old 04-04-2012, 04:12 AM   #12
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
I don't know what's wrong with your installation, but you can use the full path to the logs, e.g.:
Code:
ErrorLog "/var/log/httpd/error_log"
Regarding rotatelogs, you've forgotten the initial pipe:
Code:
CustomLog "|/usr/sbin/rotatelogs /var/log/httpd/myserver5.test.net_access_log.%Y-%m-%d 86400 +540" common
 
1 members found this post helpful.
Old 04-04-2012, 04:26 AM   #13
windstory
Member
 
Registered: Nov 2008
Posts: 489

Original Poster
Rep: Reputation: 36
Quote:
CustomLog "|/usr/sbin/rotatelogs /var/log/httpd/myserver5.test.net_access_log.%Y-%m-%d 86400 +540" common
Yes! This works!

Thanks a lot!
 
Old 03-09-2018, 02:55 AM   #14
skyluke
LQ Newbie
 
Registered: Nov 2010
Posts: 9

Rep: Reputation: 0
Reply

Quote:
Originally Posted by windstory View Post
Yes! This works!

Thanks a lot!
I need some help. I am new to Linux and recently did the upgrade. Errors below shown:

httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
(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.

Kindly help.
 
Old 03-09-2018, 03:09 AM   #15
skyluke
LQ Newbie
 
Registered: Nov 2010
Posts: 9

Rep: Reputation: 0
Another error is that when I run "MAKE" on the httpd-2.4.29 folder, it prompt me Error1 Leaving directory '/usr/src/httpd-2.4.29/support'

What does that mean?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
xdg-open, gnome-open or kde(4?)-open??? akamikeym Programming 0 08-03-2010 08:54 AM
LXer: Linux Foundation plans new, more open open-source conference next year LXer Syndicated Linux News 0 09-30-2008 11:40 AM
[SOLVED] cdrecord: No such file or directory. Cannot open '/dev/pg0'. Cannot open SCSI driver. procfs Linux - Software 5 01-18-2008 10:06 AM
LXer: Libraries facilitate open access to information with open source software LXer Syndicated Linux News 0 01-23-2007 03:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration