httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Spork Schivago <sporkschiv...@gmail.com>
Subject Re: [users@httpd] Help tracking down a weird error with Apache and local / remote connections.
Date Sun, 05 Feb 2017 23:44:07 GMT
Yehuda,

Could you please explain what you mean in a little more detail?   I only
have one server running Apache and I only have that one DNS server.   I
don't really see how my DNS server could be setup in such away where it
affects Apache's DocumentRoot's directive...

When I was logged into the remote server running Apache, Apache was serving
files from a different directory than it was when I was accessing Apache
via my local machine.   I hope that makes sense.   Looking at my Apache
conf log, when I was accessing Apache from my local machine, it was acting
properly, because I didn't have a VirtualHost setup for the www host, but
when I was accessing Apache from the server that was running Apache, it was
serving files from the domain.com VirtualHost directory.    ServerAliases
have been commented out.   To my knowledge, this should not happen.

I can probably regenerate it.   I've restarted the server and everything,
but I was thinking maybe this was some sort of bug and not a misconfigured
server.

On Sun, Feb 5, 2017 at 4:47 PM, Yehuda Katz <yehuda@ymkatz.net> wrote:

> Did you check your DNS to make sure both systems are resolving to the same
> IP address?
>
> - Y
>
>
> On Thu, Jan 26, 2017 at 3:31 PM, Spork Schivago <sporkschivago@gmail.com>
> wrote:
>
>> I have a bit of a weird problem that I'd like some help tracking down.
>> I'm pretty sure it's something with Apache.   In my Apache 2.4.25 (cPanel)
>> config file, I have the ServerAliases disabled.   There's a "catch-all"
>> entry for unbound IPs, that look like this:
>>
>> <VirtualHost *>
>>     ServerName myhostname.mydomain.com
>>     DocumentRoot /var/www/html
>>     ServerAdmin myrealemail@someplace.com
>>
>>     <IfModule suphp_module>
>>         suPHP_UserGroup nobody nobody
>>     </IfModule>
>>
>> </VirtualHost>
>>
>> Further down, I have a VirtualHost entry for mydomain.com, which has a
>> DocumentRoot of /home/<myusername>/public_html
>>
>> I setup a test file, /home/<myusername>/public_html
>> /.well-known/acme-challenge/test that says www.mydomain.com-test.
>>
>> Then I setup another test file, /var/www/html/.well-known/acme-challenge/test
>> that says myhostname.mydomain.com-test
>>
>> I have .htaccess files in /home/<myusername>/public_html that redirect
>> all traffic to secure ports.   I have cPanel installed and have manually
>> setup subdomains for the various cPanel stuff.
>>
>> Anyway, when I run the following command on the remote server:
>>    curl http://www.mydomain.com/.well-known/acme-challenge/test
>>
>> I see the 301 redirect.   When I run:
>>    curl https://www.mydomain.com/.well-known/acme-challenge/test
>> I see the:
>>    www.mydomain.com-test
>>
>>
>> However, when I run those commands on my local Linux box instead of the
>> remote server that's running Apache, I see:
>>   curl http://www.mydomain.com/.well-known/acme-challenge/test
>>   myhostname.mydomain-test
>>
>>   curl https://www.mydomain.com/.well-known/acme-challenge/test
>>   www.mydomain.com-test
>>
>>
>> It's not just curl, lynx, the command line web browser, does the same
>> thing.   On the remote computer that's running Apache, for some reason, I'm
>> seeing different results than I am when I run the commands on my local
>> Linux box.
>>
>> Any idea what's going on?
>>
>> Thanks!
>>
>> Sincerely,
>> Ken Swarthout
>>
>
>

Mime
View raw message