Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just installed apache2 on my virtual machine with the following specs:
Linux version 4.18.0-16-generic (buildd@lcy01-amd64-006) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #17~18.04.1-Ubuntu SMP Tue Feb 12 13:35:51 UTC 2019
After installing I can type localhost into my firefox browser and get the Apache2 Ubuntu default page indicating I have installed it correctly.
However, when trying to use another url with apache2 (test.dev) I get the following error:
Secure Connection Failed
The connection to the server was reset while the page was loading.
The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the website owners to inform them of this problem.
Nevertheless, I can ping test.dev and it goes right to my localhost address(127.0.0.1).
Here is the code I have in my /etc/apache2/sites-available/test.dev.conf file:
I just installed apache2 on my virtual machine with the following specs:
Linux version 4.18.0-16-generic (buildd@lcy01-amd64-006) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #17~18.04.1-Ubuntu SMP Tue Feb 12 13:35:51 UTC 2019
After installing I can type localhost into my firefox browser and get the Apache2 Ubuntu default page indicating I have installed it correctly.
However, when trying to use another url with apache2 (test.dev) I get the following error:
Secure Connection Failed
The connection to the server was reset while the page was loading.
The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the website owners to inform them of this problem.
Nevertheless, I can ping test.dev and it goes right to my localhost address(127.0.0.1).
Here is the code I have in my /etc/apache2/sites-available/test.dev.conf file:
Also (using [code] tags) Please post the contents of /etc/hosts and /etc/resolv.conf
My /etc/resolv.conf file is:
Code:
nameserver 127.0.0.53
18 options edns0
My /etc/hosts file is:
Code:
127.0.0.1 localhost test.shit
122.0.0.1 test.shit
127.0.1.1 andrew-VirtualBox
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
I was advised on another forum that Google owned the top-level domain .dev so I would not be able to use that domain without an SSL certificate so I changed my top-level domain to something that nobody could ever want and I still get the same error.
127.0.0.1 localhost test.shit
122.0.0.1 test.shit
127.0.1.1 andrew-VirtualBox
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
I was advised on another forum that Google owned the top-level domain .dev so I would not be able to use that domain without an SSL certificate so I changed my top-level domain to something that nobody could ever want and I still get the same error.
Inside your network, and certainly within a single host, you can name your server anything you want, but yes, test.dev is a real domain name apparently owned by google, so if your name server is using the worlds real DNS, you'd be connection to that server.
But you said a ping of test.dev (now test.shit?) resolved to localhost, and it looks like you have your test.shit also pointing to localhost. Not sure why it's also pointing to 122.0.0.1...that's a real IP address owned by Ministry of Foreign Affairs in Thailand.
I'm also not sure what happens if one points the same name to two different IPs in /etc/hosts. I think the first one "wins", but I just don't know.
Inside your network, and certainly within a single host, you can name your server anything you want, but yes, test.dev is a real domain name apparently owned by google, so if your name server is using the worlds real DNS, you'd be connection to that server.
But you said a ping of test.dev (now test.shit?) resolved to localhost, and it looks like you have your test.shit also pointing to localhost. Not sure why it's also pointing to 122.0.0.1...that's a real IP address owned by Ministry of Foreign Affairs in Thailand.
I'm also not sure what happens if one points the same name to two different IPs in /etc/hosts. I think the first one "wins", but I just don't know.
It gets curiouser and curiouser..
When I change that ip address in my /etc/hosts file to 127.0.0.1 or else comment it out I can't access at all. (It's file not found, not secure connection error.). However, in either case I am still able to ping the address test.shit which returns my localhost ip address 127.0.0.1 without interruption.
I am looking at the error log files to see what I can do with that information.
Have you reviewed the logs?
And, if you use code tags for config that makes it easier to read.
In the error.txt file in the apache2 logs, I was getting this message:
Code:
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[Thu Mar 21 21:37:46.211276 2019] [mpm_event:notice] [pid 32552:tid 140149875088320] AH00489: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
Looking around the internet I discovered that a possible solution was to add the line
ServerName localhost
to the apache2.conf file. I did this; the problem persists. However, the error.txt file has slightly different messages, such as:
Code:
[Fri Mar 22 21:43:29.195814 2019] [mpm_event:notice] [pid 11588:tid 139778524482496] AH00489: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Fri Mar 22 21:43:29.196118 2019] [core:notice] [pid 11588:tid 139778524482496] AH00094: Command line: '/usr/sbin/apache2'
[Fri Mar 22 21:47:42.136468 2019] [mpm_event:notice] [pid 11588:tid 139778524482496] AH00491: caught SIGTERM, shutting down
[Fri Mar 22 21:47:42.367673 2019] [mpm_event:notice] [pid 11694:tid 140467604179904] AH00489: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Fri Mar 22 21:47:42.368024 2019] [core:notice] [pid 11694:tid 140467604179904] AH00094: Command line: '/usr/sbin/apache2'
Most of these just involve the stopping and re-starting of the service, I believe. So, I'm still at a loss.
When I change that ip address in my /etc/hosts file to 127.0.0.1 or else comment it out I can't access at all. (It's file not found, not secure connection error.). However, in either case I am still able to ping the address test.shit which returns my localhost ip address 127.0.0.1 without interruption.
I am looking at the error log files to see what I can do with that information.
Thank you for your support.
Progress! You’ve connected but the Apache configuration is trying to serve a file that doesn’t exist...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.