Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

TLDR: Apache WAS serving pages to LAN computers, but suddenly only works on localhost.

Background info:

(I discovered the WAMP, XAMPP, etc packages a day after) I built a WAMP server individually, with

  • Windows 7 HomePremium 64-bit
  • Apache 2.2.21
  • PHP 5.2.17
  • MySQL 5.5

I will include httpd.conf, php.ini, httpd -S, errorlogs, host file, w/e you need, just tell me if you'd like it on a codepaste site, or inline here, or as a comment below.

Edit 1:

I should clarify that I made NO changes to any configuration files between when it worked and when it didn't, except for some reason near the same time, the MySQL service wouldn't start, because suddenly the lines

#default-character-set=utf8
#default-collation=utf8_unicode_ci

became illegal in my.ini, so I commented them out.

httpd.conf (my normal version)

(to test if the problem was here, I used a much smaller file (below), which still error'd.) All comments removed, no commands removed. Full file.

ServerRoot "C:/WebServer/Apache2.2"
Listen 80
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule setenvif_module modules/mod_setenvif.so
<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>
User daemon
Group daemon
</IfModule>
</IfModule>
ServerAdmin CannonKnapp+Apache@gmail.com
ServerName 10.0.0.9:80
DocumentRoot "C:/WebServer/--site--"
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>
<Directory "C:/WebServer/--site--">
    Options Indexes FollowSymLinks
    IndexOptions +FancyIndexing +FoldersFirst
    AllowOverride None
    order deny,allow
    deny from all
    allow from 10.0.0.0/8
    allow from 127.0.0.1
</Directory>
    <Directory "C:/WebServer/phpMyAdmin-3.4.9-english"> 
        order deny,allow
        deny from all
        allow from 10.0.0.0/8
        allow from 127.0.0.1
    </Directory>

    NameVirtualHost *:80

    <VirtualHost *:80>
        ServerName test
        DocumentRoot "C:/WebServer/--site--/dump"
        DirectoryIndex index.php
    </VirtualHost>

    <VirtualHost *:80>
        ServerName home
        DocumentRoot "C:/WebServer/--site--"
        DirectoryIndex index.php
    </VirtualHost>

    <VirtualHost *:80>
        ServerName db.home
        DocumentRoot "C:/WebServer/phpMyAdmin-3.4.9-english"
        DirectoryIndex index.php
    </VirtualHost>

<IfModule dir_module>
    DirectoryIndex index.php index.html index.htm main.html main.htm
</IfModule>
<FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</FilesMatch>
ErrorLog "logs/error.log"
LogLevel warn
<IfModule log_config_module>
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    <IfModule logio_module>
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>
    CustomLog "logs/access.log" common
</IfModule>
<IfModule alias_module>
    ScriptAlias /cgi-bin/ "C:/WebServer/Apache2.2/cgi-bin/"
</IfModule>
<Directory "C:/WebServer/Apache2.2/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Deny from all
</Directory>
DefaultType text/plain
<IfModule mime_module>
    TypesConfig conf/mime.types
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddType application/x-httpd-php .php .inc
</IfModule>
<IfModule mod_php5.c>
  php_value include_path ".:/usr/local/lib/php"
  php_admin_flag safe_mode on
</IfModule>
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
LoadModule php5_module "C:/WebServer/PHP/php5apache2_2.dll"
AddType application/x-httpd-php .php .inc
    PHPIniDir "C:/WebServer/Apache2.2/conf"

C:\WebServer\Apache2.2\bin>httpd -S

VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80                   is a NameVirtualHost
         default server test (C:/WebServer/Apache2.2/conf/httpd.conf:278)
         port 80 namevhost test (C:/WebServer/Apache2.2/conf/httpd.conf:278)
         port 80 namevhost home (C:/WebServer/Apache2.2/conf/httpd.conf:284)
         port 80 namevhost db.home (C:/WebServer/Apache2.2/conf/httpd.conf:290)
Syntax OK

Edit 2:

The LAN computers time out trying to access 10.0.0.9 or any hostfile alias: "The connection has timed out: The server at home is taking too long to respond." On a fresh-log restart of Apache, after attempting to access 10.0.0.9 from a LAN computer, access.log is still blank, and error.log says:

[Wed Feb 15 23:56:20 2012] [notice] Apache/2.2.21 (Win32) PHP/5.2.17 configured -- resuming normal operations
[Wed Feb 15 23:56:20 2012] [notice] Server built: Sep  9 2011 10:26:10
[Wed Feb 15 23:56:20 2012] [notice] Parent: Created child process 16324
[Wed Feb 15 23:56:20 2012] [notice] Child 16324: Child process is running
[Wed Feb 15 23:56:20 2012] [notice] Child 16324: Acquired the start mutex.
[Wed Feb 15 23:56:20 2012] [notice] Child 16324: Starting 64 worker threads.
[Wed Feb 15 23:56:20 2012] [notice] Child 16324: Starting thread to listen on port 80.

Possible causes:

  • I uninstalled Norton AV and installed AVG Free 2012
  • I rebooted it (though not the first time)
  • as mentioned above, MySQL wouldn't start after the last reboot, and I tracked it down to "default-character-set=utf8" not being allowed anymore, in favor of "character-set-server=utf8"

Edit 3: (sorry this is getting so long)

Using this minimalist httpd.conf (no ServerAlias's) yields no change; the server is still inaccessible from multiple LAN PCs.

ServerRoot "C:/WebServer/Apache2.2"
Listen 80
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule setenvif_module modules/mod_setenvif.so
<IfModule !mpm_netware_module>
    <IfModule !mpm_winnt_module>
        User daemon
        Group daemon
    </IfModule>
</IfModule>
ServerAdmin CannonKnapp+Apache@gmail.com
ServerName 10.0.0.9:80
DocumentRoot "C:/WebServer/--site--"
<Directory "C:/WebServer/--site--">
    Options Indexes FollowSymLinks
    IndexOptions +FancyIndexing +FoldersFirst
    AllowOverride None
    allow from all
</Directory>
<IfModule dir_module>
    DirectoryIndex index.php index.html index.htm main.html main.htm
</IfModule>
ErrorLog "logs/error.log"
LogLevel warn
    <IfModule log_config_module>
        LogFormat "%h %t %>s %b \t\"%r\" \tfrom:(\"%{Referer}i\") ~ [\"%{User-Agent}i\"]" combined
        LogFormat "%h %l %u %t %>s %b \t\"%r\"" common
        <IfModule logio_module>
          LogFormat "%h %l %u %t %>s %b \"%r\" ~ \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
          CustomLog "logs/access2.log" combinedio
        </IfModule>
        CustomLog "logs/access.log" common
        CustomLog "logs/access.combined.log" combined
    </IfModule>
DefaultType text/plain
<IfModule mime_module>
    TypesConfig conf/mime.types
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddType application/x-httpd-php .php .inc
</IfModule>
<IfModule mod_php5.c>
  php_value include_path ".:/usr/local/lib/php"
  php_admin_flag safe_mode on
</IfModule>
LoadModule php5_module "C:/WebServer/PHP/php5apache2_2.dll"
AddType application/x-httpd-php .php .inc
    PHPIniDir "C:/WebServer/Apache2.2/conf"

Edit 4:

netstat -an

  Proto  Local Address          Foreign Address        State
  TCP    0.0.0.0:21             0.0.0.0:0              LISTENING
  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING
  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:445            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:554            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:990            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:2869           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:3306           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:5357           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:10243          0.0.0.0:0              LISTENING
  TCP    0.0.0.0:49152          0.0.0.0:0              LISTENING
  TCP    0.0.0.0:49153          0.0.0.0:0              LISTENING
  TCP    0.0.0.0:49154          0.0.0.0:0              LISTENING
  TCP    0.0.0.0:49156          0.0.0.0:0              LISTENING
  TCP    0.0.0.0:49167          0.0.0.0:0              LISTENING
  TCP    10.0.0.9:139           0.0.0.0:0              LISTENING
  TCP    10.0.0.9:61322         74.125.224.39:443      ESTABLISHED
  TCP    10.0.0.9:61324         74.125.53.125:5222     ESTABLISHED
  TCP    10.0.0.9:61327         74.125.224.136:443     ESTABLISHED
  TCP    10.0.0.9:61332         74.125.224.113:443     ESTABLISHED
  TCP    10.0.0.9:64902         80.68.88.15:80         CLOSE_WAIT
  TCP    10.0.0.9:65041         74.125.224.98:443      ESTABLISHED
  TCP    127.0.0.1:2559         0.0.0.0:0              LISTENING
  TCP    127.0.0.1:4664         0.0.0.0:0              LISTENING
  TCP    127.0.0.1:5679         0.0.0.0:0              LISTENING
  TCP    127.0.0.1:7438         0.0.0.0:0              LISTENING
  TCP    127.0.0.1:14147        0.0.0.0:0              LISTENING
  TCP    127.0.0.1:14147        127.0.0.1:61315        ESTABLISHED
  TCP    127.0.0.1:61315        127.0.0.1:14147        ESTABLISHED
  TCP    [::]:21                [::]:0                 LISTENING
  TCP    [::]:135               [::]:0                 LISTENING
  TCP    [::]:445               [::]:0                 LISTENING
  TCP    [::]:554               [::]:0                 LISTENING
  TCP    [::]:990               [::]:0                 LISTENING
  TCP    [::]:2869              [::]:0                 LISTENING
  TCP    [::]:3306              [::]:0                 LISTENING
  TCP    [::]:3587              [::]:0                 LISTENING
  TCP    [::]:5357              [::]:0                 LISTENING
  TCP    [::]:10243             [::]:0                 LISTENING
  TCP    [::]:49152             [::]:0                 LISTENING
  TCP    [::]:49153             [::]:0                 LISTENING
  TCP    [::]:49154             [::]:0                 LISTENING
  TCP    [::]:49156             [::]:0                 LISTENING
  TCP    [::]:49167             [::]:0                 LISTENING
  TCP    [::1]:3306             [::1]:60428            ESTABLISHED
  TCP    [::1]:5679             [::]:0                 LISTENING
  TCP    [::1]:14147            [::]:0                 LISTENING
  TCP    [::1]:60428            [::1]:3306             ESTABLISHED
  UDP    0.0.0.0:500            *:*                    
  UDP    0.0.0.0:3702           *:*                    
  UDP    0.0.0.0:3702           *:*                    
  UDP    0.0.0.0:3702           *:*                    
  UDP    0.0.0.0:3702           *:*                    
  UDP    0.0.0.0:4500           *:*                    
  UDP    0.0.0.0:5004           *:*                    
  UDP    0.0.0.0:5005           *:*                    
  UDP    0.0.0.0:5355           *:*                    
  UDP    0.0.0.0:50469          *:*                    
  UDP    0.0.0.0:52432          *:*                    
  UDP    0.0.0.0:64969          *:*                    
  UDP    10.0.0.9:137           *:*                    
  UDP    10.0.0.9:138           *:*                    
  UDP    10.0.0.9:1900          *:*                    
  UDP    10.0.0.9:63401         *:*                    
  UDP    127.0.0.1:1900         *:*                    
  UDP    127.0.0.1:48000        *:*                    
  UDP    127.0.0.1:48001        *:*                    
  UDP    127.0.0.1:63402        *:*                    
  UDP    [::]:500               *:*                    
  UDP    [::]:3540              *:*                    
  UDP    [::]:3702              *:*                    
  UDP    [::]:3702              *:*                    
  UDP    [::]:3702              *:*                    
  UDP    [::]:3702              *:*                    
  UDP    [::]:4500              *:*                    
  UDP    [::]:5004              *:*                    
  UDP    [::]:5005              *:*                    
  UDP    [::]:5355              *:*                    
  UDP    [::]:50470             *:*                    
  UDP    [::]:52433             *:*                    
  UDP    [::]:64970             *:*                    
  UDP    [::1]:1900             *:*                    
  UDP    [::1]:63400            *:*                    
  UDP    [fe80::e954:ccd0:fa11:7768%11]:1900  *:*                    
  UDP    [fe80::e954:ccd0:fa11:7768%11]:63399  *:*                    
share|improve this question

migrated from serverfault.com Feb 16 '12 at 17:53

This question came from our site for system and network administrators.

    
Inline here please, and after you've pasted them, just highlight them and press the code formatting button. Particularly the httpd.conf and httpd -S –  Mark Henderson Feb 16 '12 at 7:24
    
Thank you! -added my normal httpd.conf in full, sans comments. –  CannonFireCode Feb 16 '12 at 7:41
    
I've included the normal httpd.conf, minimalist httpd.conf, error.log, httpd -S. –  CannonFireCode Feb 16 '12 at 8:07
    
What is the exact URL you're using to try and access your server? Is it http://10.0.0.9:80 or something else? –  Brian Showalter Feb 16 '12 at 13:56
    
Yes Brian, that is exactly right. I have it aliased in my hosts file as "home". –  CannonFireCode Feb 16 '12 at 16:53

2 Answers 2

Check that the firewall on yor 'server' system is allowing traffic on port 80. Check that noting else is using your external IP address port 80 (skype is good at stealing it for example).

share|improve this answer
    
Thank you lain. Skype is installed on the server computer, however it is not running. (at all: I've checked the processes). I ran into the Skype-Apache problem last week, and have adjusted Skype's ports so that they both DID work in conjunction until these gremlins dropped LAN access. –  CannonFireCode Feb 16 '12 at 8:51
    
You can make it clear by command: netstat -nab Look on the process name is using port 80. The next step is trying to telnet to 10.0.0.9:80 from server itself, then telnet from client: telnet 10.0.0.9 80 . Is it connectable, if yes put some dump input and post the response. –  Gk01 Feb 16 '12 at 11:23
    
I have spent the last few hours installing/enabling telnet clients and hosts on a client and the server PC, only to find that windows local users & groups (LUG) is disabled on Windows 7 HomePremium, so I can't figure out a way to add any user account on the server PC to the TelnetClients group, so I cannot telnet into the server PC. -- If anyone can show me how to change user groups in Win7hp, or some other way to allow telnet from the server, I'll certainly do so. –  CannonFireCode Feb 16 '12 at 16:55
    
@CannonFireCode: Just get PuTTY and use it for Telnet. –  afrazier Feb 16 '12 at 19:25
    
When I read the word "firewall" bam I realized that is the problem. thanks –  Cihad Turhan Jun 23 at 13:35

Why are there no error log entries detailing what the apache involvement is ?

Oh, I see, nothing.

Then produce netstat -an and check what is already messing with port 80.

Of course, it's Windoze, so it may just be "because".

share|improve this answer
1  
-1 for last sentence. –  Mark Henderson Feb 16 '12 at 8:36
    
Are there any security dangers from dumping netstat -an's output? I'm NAT'd behind a home-grade router. –  CannonFireCode Feb 16 '12 at 8:49
    
None whatsoever, if you are not handling public IPs on the machine itself. –  adaptr Feb 16 '12 at 9:18
    
To be clear, does "handling public IPs on the machine itself" mean serving to the internet at large? Because I don't have dynamic DNS support, nor does my httpd.conf allow internet connections. I'll post it above. TY. –  CannonFireCode Feb 16 '12 at 10:05
    
It means the machine has public IPs assigned and is reachable by those directly. This is not likely if you don't have apache or networking experience. –  adaptr Feb 16 '12 at 10:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.