logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Starting apache 2.2.8 server = no errors but does nothing
Author
clem_c_rock



Joined: 27 Nov 2007
Posts: 10

PostPosted: Thu 07 Feb '08 6:12    Post subject: Starting apache 2.2.8 server = no errors but does nothing Reply with quote

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: 7298
Location: Germany, Next to Hamburg

PostPosted: Thu 07 Feb '08 10:14    Post subject: Reply with quote

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

PostPosted: Thu 07 Feb '08 16:37    Post subject: Reply with quote

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

PostPosted: Fri 08 Feb '08 5:34    Post subject: Reply with quote

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: 7298
Location: Germany, Next to Hamburg

PostPosted: Fri 08 Feb '08 10:09    Post subject: Reply with quote

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

PostPosted: Sat 09 Feb '08 23:21    Post subject: Reply with quote

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

PostPosted: Sun 10 Feb '08 1:15    Post subject: Reply with quote

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

PostPosted: Tue 12 Feb '08 22:55    Post subject: Reply with quote

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: 7298
Location: Germany, Next to Hamburg

PostPosted: Tue 12 Feb '08 23:06    Post subject: Reply with quote

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

PostPosted: Sat 16 Feb '08 4:32    Post subject: Reply with quote

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: 7298
Location: Germany, Next to Hamburg

PostPosted: Sat 16 Feb '08 10:47    Post subject: Reply with quote

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

PostPosted: Mon 18 Feb '08 23:38    Post subject: Reply with quote

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: 7298
Location: Germany, Next to Hamburg

PostPosted: Tue 19 Feb '08 10:27    Post subject: Reply with quote

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

PostPosted: Tue 19 Feb '08 22:37    Post subject: Reply with quote

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: 7298
Location: Germany, Next to Hamburg

PostPosted: Tue 19 Feb '08 23:48    Post subject: Reply with quote

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

PostPosted: Wed 20 Feb '08 3:34    Post subject: Reply with quote

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: 7298
Location: Germany, Next to Hamburg

PostPosted: Wed 20 Feb '08 10:35    Post subject: Reply with quote

Seems that this module has not built correctly. Did you compile apache yourself or installed from your distro?
Back to top


Reply to topic   Topic: Starting apache 2.2.8 server = no errors but does nothing View previous topic :: View next topic
Post new topic   Forum Index -> Apache