Author |
|
clem_c_rock
Joined: 27 Nov 2007 Posts: 10
|
Posted: Thu 07 Feb '08 6:12 Post subject: Starting apache 2.2.8 server = no errors but does nothing |
|
|
Hello,
I've installed apache 2.2.8 on Ubuntu and I have gotten as far as setting httpd.conf up as far as it won't throw any errors when I do a sudo httpd -k start.
The only thing, is that when I run sudo httpd -k start, nothing happens.
Where is the first place one would look to diagnose this?
Thanks,
Clem C |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Thu 07 Feb '08 10:14 Post subject: |
|
|
Anything the error_log? Tried to start in debug mode ? -e debug? |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Thu 07 Feb '08 16:37 Post subject: |
|
|
One problem is that httpd -k start is the command to start Apache on Microsoft Windows.
Apache on Unix does not have any -k switch.
On Unix, Apache is usually started with the apachectl script. Maybe you should use: sudo apachectl start
If you installed Apache 2.2.8 into a specific directory, then be sure to use the full path, e.g. sudo /opt/apache2/apachectl start
If Apache is not running right, the first place you should look is in the Apache error log.
The location of the error log file depends on where you obtained Apache 2.2.8. If you got it from a package, then it will be in /var/log/apache2. If you built Apache 2.2.8 from source code, then it will be in the /logs directory where you installed Apache.
-tom- |
|
Back to top |
|
clem_c_rock
Joined: 27 Nov 2007 Posts: 10
|
Posted: Fri 08 Feb '08 5:34 Post subject: |
|
|
I installed my apache 2.2.8 from the source here:
/etc/httpd-2.2.8/
and when I do
more /etc/httpd-2.2.8/logs/error_log
I get this:
(2)No such file or directory: httpd: could not open error log file /logs/error_log.
Unable to open logs
I'm confused because it looks like the log file's been written to but it's saying the logs can't be open |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Fri 08 Feb '08 10:09 Post subject: |
|
|
That is
/etc/httpd-2.2.8/logs/error_log != /logs/error_log
/ points to the root and by default there is no logs folder
Code: |
ErrorLog /etc/httpd-2.2.8/logs/error_log
|
|
|
Back to top |
|
clem_c_rock
Joined: 27 Nov 2007 Posts: 10
|
Posted: Sat 09 Feb '08 23:21 Post subject: |
|
|
I was thinking that the httpd.conf was pointing to the /logs directory relative to it's installation.
Here's what I have in my httpd.conf for the base virtualhost
<VirtualHost 208.01.101.100>
DocumentRoot "/usr/local/apache2/htdocs"
ServerName 208.01.101.100
ErrorLog /logs/error_log
</VirtualHost>
I also set the base error log file to this:
ErrorLog "/logs/error_log"
Still, when I do a sudo apachectl start, I get nothing. |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Sun 10 Feb '08 1:15 Post subject: |
|
|
re: "I was thinking that the httpd.conf was pointing to the /logs directory relative to it's installation."
That is only true when it does not start with a slash. For example: Code: | ErrorLog logs/error_log |
When you use a leading slash (as you have), it is an absolute path. If your system does not have a /logs directory you won't get an error log.
-tom- |
|
Back to top |
|
clem_c_rock
Joined: 27 Nov 2007 Posts: 10
|
Posted: Tue 12 Feb '08 22:55 Post subject: |
|
|
ok - now starting to get somewhere:
in logs/error_log:
[Mon Feb 11 06:16:12 2008] [warn] pid file /var/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Mon Feb 11 06:16:12 2008] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
[Mon Feb 11 06:16:12 2008] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
[Mon Feb 11 06:16:12 2008] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
[Mon Feb 11 06:16:12 2008] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
[Mon Feb 11 06:16:12 2008] [notice] Apache/2.2.4 (Unix) configured -- resuming normal operations
[Mon Feb 11 06:16:12 2008] [alert] Child 21773 returned a Fatal error... Apache is exiting!
[Mon Feb 11 06:16:12 2008] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 12 Feb '08 23:06 Post subject: |
|
|
clem_c_rock wrote: | alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
|
Somewhere in your httpd.conf there is
Code: |
User someone
Group somegroup
|
Seems that the user you set does not exist or apache can not find it.
I recommed you to set it to nobody and nogroup
or if needed to www-data and www-data. Not sure if www-data exist on Ubuntu. On the big brother debian there is www-data user. |
|
Back to top |
|
clem_c_rock
Joined: 27 Nov 2007 Posts: 10
|
Posted: Sat 16 Feb '08 4:32 Post subject: |
|
|
Good news - The server actually starts w/ no problem.
but, when I do: sudo apachectl restart
I get:
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Bad new is that I've configure my paths wrong so when I go to my ip: 208.78.101.123 I get this:
The requested URL / was not found on this server.
In the httpd.conf, my ServerRoot is set to this:
ServerRoot "/etc/httpd-2.2.8/"
and my virtualhost looks like this:
<VirtualHost *>
DocumentRoot "/www/vhosts/ehermann"
ServerName "www.ehermann.com"
ServerAlias "www.e-hermann.com"
ErrorLog logs/error_log
</VirtualHost>
The directory /www/vhosts/ehermann does exist and I have a simple index.html file in there. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Sat 16 Feb '08 10:47 Post subject: |
|
|
Quote: |
Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
|
Set outside the vhost in httpd.conf a server name.
Before your vhost block I miss a NameVirtualHost *:80
Did you set that? |
|
Back to top |
|
clem_c_rock
Joined: 27 Nov 2007 Posts: 10
|
Posted: Mon 18 Feb '08 23:38 Post subject: |
|
|
I have that section set up like this:
Code: |
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "/www/vhosts/ehermann"
ServerName "www.ehermann.com"
ServerAlias "www.e-hermann.com"
ErrorLog logs/error_log
<Directory "/www/vhosts/ehermann">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
|
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 19 Feb '08 10:27 Post subject: |
|
|
You configured the vhost right, but outside of the vhost container you need to set servername as well. For some reason Linux wants that.
Code: |
ServerName www.ehermann.com
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "/www/vhosts/ehermann"
ServerName "www.ehermann.com"
ServerAlias "www.e-hermann.com"
ErrorLog logs/error_log
<Directory "/www/vhosts/ehermann">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
|
|
|
Back to top |
|
clem_c_rock
Joined: 27 Nov 2007 Posts: 10
|
Posted: Tue 19 Feb '08 22:37 Post subject: |
|
|
Great - that took care of the "Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName" warning.
Still, when I go to my IP: http://208.78.101.123/
I get the 404.
Thanks for all your help! |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 19 Feb '08 23:48 Post subject: |
|
|
http://208.78.101.123/index.html works! But as txt, not html. Seems that apache sends a wrong header.
Watch for DirectoryIndex
and if not given add index.html
Code: |
DirectoryIndex index.htm index.html
|
Well this is often in <IfModule dir_module> block. So mod_dir need to be loaded. Loading mod_autoindex and mod_mime is also a good idea. |
|
Back to top |
|
clem_c_rock
Joined: 27 Nov 2007 Posts: 10
|
Posted: Wed 20 Feb '08 3:34 Post subject: |
|
|
each step provides more errors.
Now I get this:
Syntax error on line 74 of /etc/apache2/httpd.conf: Cannot load /etc/httpd-2.2.8/modules/mappers/mod_dir.c into server: /etc/httpd-2.2.8/modules/mappers/mod_dir.c: invalid ELF header |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Wed 20 Feb '08 10:35 Post subject: |
|
|
Seems that this module has not built correctly. Did you compile apache yourself or installed from your distro? |
|
Back to top |
|