[kwlug-disc] Ubuntu 12.04 LTS localhost* and internet fail - where to start^h^h^h^h^h continue?

Khalid Baheyeldin kb at 2bits.com
Sat Apr 12 18:16:40 EDT 2014


On Sat, Apr 12, 2014 at 3:53 PM, John Johnson <jvj at golden.net> wrote:

>  4) restarted Apache2; no start; errors re: ServerName
>

Even if there is an error like this, it should not have any effect on
Apache working.


> 6) restarted Apache2; no error on serverName; apache starts; partial
> success;
> 7: FF: w/address "localhost" returns an empty "Index of /" page; does not
> return a 404 error; also does not return the expected "It Works" page.
>

Seems Apache is responding then.

Try this to see what is being sent.

$ wget --server-response -O /dev/null localhost
--2014-04-10 13:40:22--  http://localhost/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response...
  HTTP/1.1 200 OK
  Date: Thu, 10 Apr 2014 17:40:22 GMT
  Server: Apache/2.2.22 (Ubuntu)
  Vary: Accept-Encoding
  Content-Length: 722
  Keep-Alive: timeout=5, max=100
  Connection: Keep-Alive
  Content-Type: text/html;charset=UTF-8
Length: 722 [text/html]


> 8) FF: w/address "localhost/index.php" (or any of the expected test/info
> pages) returns a 404 "Not Found" error
>

First create a test.txt file and put in it a few words.
Put it in /var/www and make it 644.

Now visit localhost/test.txt and see if it loads the file from that
location.

If not, then you need to check /etc/apache2/sites-enabled and see where you
have Apache looking for files to serve.


>
> Assumptions:
> A) The default mapping of localhost to the default areas in /etc/apache2
> was not reestablished in the re-install of Apache.
> B) The mapping of localhost may be elsewhere in /etc but outside of
> /etc/apache leading to a mis-match in the configuration.
> I may need to pull localhost mapping info from the Git/etckeeper
> repository.
>
> (a) the move (aka rename) was required because the apt-get remove x did
> not do all that was required.
> (b)  many hits in Stackoverflow and elsewhere ask one to change httpd.conf.
> This was changed to apache2.conf in a recent (and subsequent) Ubuntu /
> Apache implementation.
> I have a copy of an old httpd.conf in the copy of the old apache2
> directory and may need use same as reference.
>
> Status:
> Internet access from both Windows box and Linux box: OK.
> Linux box: Apache2 is running well enough to make localhost accessible w/o
> the 404 error (see above).
> Linux box: Apache2 is not running well enough to provide access to
> localhost/index.php or any of the other Apache test/info pages.
>
> Continuing (another day)
>
> Posting here for the possible benefit of others.
> And to solicit advice / suggestions / direction.
>
> Thanks
> John Johnson
>
> On 2014-04-11 09:17, Adam Glauser wrote:
>
>  On Fri, Apr 11, 2014 at 7:49 AM, <jvj at golden.net> wrote:
>>
>> But before I embark on these repairs I am considering putting apache
>> under Git.
>> I want to be able to capture and save my current apache configuration in
>> case this is lost in any rebuild.
>>
>
>  I recall etckeeper* being suggested in the past.
>
>  * http://joeyh.name/code/etckeeper/
> * https://help.ubuntu.com/12.04/serverguide/etckeeper.html
>
>
> < ... snip  ... >
>
> _______________________________________________
> kwlug-disc mailing list
> kwlug-disc at kwlug.org
> http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
>
>


-- 
Khalid M. Baheyeldin
2bits.com, Inc.
Fast Reliable Drupal
Drupal optimization, development, customization and consulting.
Simplicity is prerequisite for reliability. --  Edsger W.Dijkstra
Simplicity is the ultimate sophistication. --   Leonardo da Vinci
For every complex problem, there is an answer that is clear, simple, and
wrong." -- H.L. Mencken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20140412/5080e8a2/attachment.htm>


More information about the kwlug-disc mailing list