logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: [SOLVED] Page Not Loading with www Prefix in Apache 20.04
Author
bilovex25



Joined: 29 Apr 2022
Posts: 3
Location: USA

PostPosted: Fri 29 Apr '22 9:10    Post subject: [SOLVED] Page Not Loading with www Prefix in Apache 20.04 Reply with quote

I would like someone to assist me with the webpage not loading when the prefix www is added to the url. Please accept my gratitude in advance.

The term "mydomain.com" is used as an example as well as 123,456.. as IP address.

Here is the configuration of all pertinent files.

A/AAAA Record
Hostname IP Address TTL
Domain.com 123.456.78 Default
………………………………………………………………………………………
CNAME
Hostname Aliases TTL
www mydomain.com Default
…………………………………………………………………………………
Hosts File
127.0.0.1 ns-1.mydomain.com localhost
127.0.1.1 ns-1

123.456.789 mydomain.com
123.456.789 www.mydomain.com
………………………………………………………………………………………
Hostname File
ns-1
………………………………………………………………………………………
000-default.conf file

ServerName www.mydomain.com
ServerAlias mydomain.com
………………………………………………………………………………………
Test
curl www.mydomain page loads quickly
curl mydomain.com page loads up quickly
ping www.mydomain 0% packet loss
ping mydomain.com 0% packet loss
mydomain.com loads up quickly in browser
PROBLEM
www.mydomain.com DOES NOT LOAD UP,
Browser Displayed
Hmm. We’re having trouble finding that site.
We can’t connect to the server at www.mydomain.com
………………………………………………………………………………………

Error Logfile (The complete log is the same as seen below.)

Fri Apr 29 05:33:15.029514 2022] [mpm_prefork:notice] [pid 1152] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured -- resuming normal operations
[Fri Apr 29 05:33:15.032854 2022] [core:notice] [pid 1152] AH00094: Command line: '/usr/sbin/apache2'
[Fri Apr 29 05:36:05.192624 2022] [mpm_prefork:notice] [pid 1152] AH00171: Graceful restart requested, doing restart
[Fri Apr 29 05:36:05.289769 2022] [mpm_prefork:notice] [pid 1152] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured -- resuming normal operations
[Fri Apr 29 05:36:05.289798 2022] [core:notice] [pid 1152] AH00094: Command line: '/usr/sbin/apache2'


Last edited by bilovex25 on Tue 03 May '22 22:49; edited 1 time in total
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Tue 03 May '22 8:41    Post subject: Reply with quote

My guess is that it is a browser issue. However you can add a default / catch-all vhost and see if your browser opens that one.

Code:

<VirtualHost _default_:80>
   DocumentRoot "C:/default"

   <Directory "C:/default">
      Options Indexes FollowSymLinks
      AllowOverride All
      Require local
   </Directory>

   CustomLog "C:\nul" common
</VirtualHost>
Back to top
bilovex25



Joined: 29 Apr 2022
Posts: 3
Location: USA

PostPosted: Tue 03 May '22 22:10    Post subject: Reply with quote

You are absolutely correct in your assessment. Also, it was a propagation issue. In fact, when I checked the site in a different computer, the pages could be seen flawlessly. Regarding the browser issue, after 26 hours waiting the pages showed up as expected in the computer that they did not load.

Thank you for your input,

Regards
Back to top


Reply to topic   Topic: [SOLVED] Page Not Loading with www Prefix in Apache 20.04 View previous topic :: View next topic
Post new topic   Forum Index -> Apache