Re: Apache says "It works" but also "Requested URL could not be found"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you Luca, it does help, it even solves ...
I can retrace the steps of my error now :

1) I call my host "lacolshow" and there's localhost in the apache
system, so seeing the two often at close intervals made me once
confuse them and mistype "lacolhost".

2) As I often rely of my browser's autocompletion mechanism, the error
repeated itself without me noticing it.


I wonder though why Apache answers "It works" on "lacolhost.com" but
answers "Server not found" on a random, meaningless URL like
http://www.qrstuqvqwq.com/.
I presume that lacolhost.com is an already existing website that I
cannot view directly.


On Fri, Nov 18, 2016 at 3:46 PM, Luca Toscano <toscano.luca@xxxxxxxxx> wrote:
> Hi Roparzh,
>
>
> 2016-11-18 15:13 GMT+01:00 Roparzh Hemon <roparzhhemon@xxxxxxxxx>:
>>
>> Apache says "It works" but also "Requested URL could not be found"
>>
>>   This problem seems to have jumped out of nowhere when I returned
>> from other projects. The project worked fine before.
>> A random Google search suggests the problem might come from permissions,
>> but file permissions seem OK (see below).
>>
>>    The access and log files are blank.
>>   Any help appreciated.
>>
>>   The details :
>>
>> Apache says "It works" when I type http://www.lacolhost.com
>
>
> this is probably because you are getting the output of the default virtual
> host (side note: in your definition below there is "localshow.com" not
> "localhost.com")
>
>>
>>
>> Apache says "The requested URL /index.php was not found on this server"
>> when
>> I type   http://www.lacolhost.com/index.php
>
>
> Have you tried with localshow.com? Is it a transcript error?
>
>>
>>
>>  My /private/etc/hosts file  contains the line
>>
>>   127.0.0.1 localshow.com www.localshow.com
>
>
> Please check that this domain resolves to localhost with dig or similar.
> If it doesn't work, you can easily simulate it your browser on a shell with:
>
> curl http://localhost/index.php --header "Host: localshow.com"
>
>>
>>
>>
>> My /private/etc/apache2/extra/httpd-vhosts.conf file contains the
>> following paragraph :
>>
>>  <VirtualHost *:80>
>>     ServerName localshow.com
>>     ServerAlias www.localshow.com
>>     DocumentRoot "/Users/myusernamehere/Documents/Sites/Show"
>>     ErrorLog "/private/var/log/apache2/localshow.com-error_log"
>>     CustomLog "/private/var/log/apache2/localshow.com-access_log" common
>>     ServerAdmin web@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
>>     LoadModule php5_module /usr/libexec/apache2/libphp5.so
>> <Directory /Users/myusernamehere/Documents/Sites/Show>
>> Require all granted
>> DirectoryIndex index.php
>> </Directory>
>> </VirtualHost>
>>
>>  Permissions for /Users/myusernamehere/Documents/Sites/Show
>>
>>  drwxr-xr-x  18 myusernamehere  staff  612 11 nov 15:07
>>
>>
>>  Permissions for /Users/myusernamehere/Documents/Sites/Show/index.php :
>>
>>  -rw-r--r--@ 1 myusernamehere  staff    23 18 nov 14:25 index.php
>>
>
> Hope that helps!
>
> Luca
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux