Starting apache 2.2.8 server = no errors but does nothing

Discussion in 'Apache' started by clem_c_rock, Feb 6, 2008.

  1. #1
    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
     
    clem_c_rock, Feb 6, 2008 IP
  2. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #2
    How did you install it ?

    If you use apt-get to install,
    sudo apt-get install apache2
    Code (markup):
    you should only have to use the following to start|stop|restart the server.
    sudo /etc/init.d/apache2 start|stop|restart
    Code (markup):
     
    joebert, Feb 6, 2008 IP
  3. 007c

    007c Peon

    Messages:
    611
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    On debian you can use the command apache2ctl start | stop etc...
     
    007c, Feb 11, 2008 IP
  4. clem_c_rock

    clem_c_rock Member

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #4
    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.
     
    clem_c_rock, Feb 15, 2008 IP
  5. clem_c_rock

    clem_c_rock Member

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #5
    getting closer - now the server starts but now I get a 404 when I visit the IP

    Here's my setup so far:

    
    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>
    
    <IfModule mod_dir.c>
        DirectoryIndex index.html index.htm
    </IfModule>
    
    Code (markup):
    When I fire up the server I get the 404:

    Not Found

    The requested URL / was not found on this server.
     
    clem_c_rock, Feb 19, 2008 IP
  6. RectangleMan

    RectangleMan Notable Member

    Messages:
    2,825
    Likes Received:
    132
    Best Answers:
    0
    Trophy Points:
    210
    #6
    Try setting the ServerName variable in your httpd.conf Try it as localhost or whatever you have your server named ...ns1 or domain.com...I had a similar issue at one point.

    http://httpd.apache.org/docs/2.2/mod/core.html#servername
     
    RectangleMan, Feb 21, 2008 IP
  7. clem_c_rock

    clem_c_rock Member

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #7
    Here's the latest I'm trying

    
    Listen 208.78.101.123:80
    
    DocumentRoot "/www/vhosts"
    
    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>
    
    <IfModule mod_dir.c>
        DirectoryIndex index.html index.htm
    </IfModule>
    
    Code (markup):
    I'm still getting a 404 after firing up the server
     
    clem_c_rock, Feb 26, 2008 IP