after installing ssl getting wired error DNS_PROBE_FINISHED_NXDOMAIN - laravel

after installing paid ssl certification the web site sometime give some visitors this wired error
i'm using laravel 6 the host is aws light sail Ubuntu 18
my laravel conifg in Apache2
<VirtualHost *:80>
Redirect permanent "/" https://www.sitename.com/
</virtualHost>
<VirtualHost *:443>
ServerAdmin webmaster#localhost
DocumentRoot /var/www/html/star-flight/public
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/example.key
SSLCertificateChainFile /etc/apache2/ssl/chain.crt
<Directory /var/www/html/star-flight/public >
AllowOverride All
Allow from all
Options Indexes FollowSymLinks MultiViews
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

That error message is a DNS error which indicates that the IP address for the domain cannot be found. It is not related to SSL, as browser has not connected to the site to begin SSL negotiation.
If the site opens fine for some and not others, then it could be a DNS propagation issue.
Review your DNS settings. You also can check DNS propagation at https://dnschecker.org/

Related

Add Virtual Host in Apache Windows 10

I am trying to add Virtual Hosts with SSL certificates to Apache on a Windows 10 environment.
It is my first time using Apache (total newb!), and have done my basic setup using online tutorials and blogs. My Apache service is running, and I am able to get the correct response when typing localhost in the browser. However, when I add my new Virtual Host, and try to restart the Apache service, it fails (Error 1067: The process terminated unexpectedly).
The problem seems to be with my SSL certificates in the setup. When I delete the certificate lines in the code below, the Apache service restarts with no problem. However the new Virtual Host does not open/resolve. I think this is due to the required certificates(?).
Here is my code:
In my httpd-vhosts.conf
<VirtualHost *:443>
ServerAdmin name#domain.co.za
ServerName odyssey.rain.network
ServerAlias odyssey.rain.network
DocumentRoot c:/Apache24/htdocs/odyssey.rain.network
SSLEngine on
SSLCertificateFile c:/Apache24/ssl/network/server.crt
SSLCertificateKeyFile c:/Apache24/ssl/network/rain.key
SSLCertificateChainFile c:/Apache24/ssl/network/ca.crt
ErrorLog logs/odyssey.rain.network-error.log
CustomLog logs/odyssey.rain.network-access.log combined
<Directory c:/Apache24/htdocs/odyssey.rain.network>
AllowOverride All
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin name#domain.co.za
ServerName odyssey.rain.network
Redirect / https://odyssey.rain.network
</VirtualHost>
I have also updated my hosts file with: 127.0.0.1 odyssey.rain.network
Thank you in advance!

Changed A Record to point to new server. Non www 404

I've moved my site to be hosted with Digital Ocean. I've set the A records to point to the severs IP address. The www lands on the site as expected but the non www 404s.
Not Found
The requested URL / was not found on this server.
Apache/2.4.18 (Ubuntu) Server at mydomainhere.com Port 80
Apache config looks like:
<VirtualHost *:80>
ServerName mydomainhere.com
DocumentRoot /var/www/html/public
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/laravel>
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Any ideas? Cheers!

Ubuntu 14.04 Apache2 404 Page Not Found

I've setted up an Ubuntu 14.04 with php5, Apache2, mysql / mysql-php.
Now I am tring to visit mydomain.com/admin but its response the following error
The requested URL /admin was not found on this server.
Here is my mydomain.com.conf file
<VirtualHost *:80>
<Directory /var/www/mydomain>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ServerName mydomain.com
ServerAlias www.mydomain.com
DocumentRoot /var/www/mydomain
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
mod_rewrite is already enabled
You can't access the domain because you haven't properly configured a live domain. Go to http://localhost:80/admin to access your information. I would try setting the server name equal to your public IP address and set the server alias equal to localhost. Then you'll be able to access the server from over the web by entering your public IP address into the URL of your HTTP client.

XAMPP VirtualHosts Access From Mobile Device

Could you please help me to access XAMPP localhost sites from a mobile device (either from home network or from internet)
I am using multiple virtual hosts to access all sites using a short link for each. Please see the configuration of virtual hosts below:
<VirtualHost *:80>
ServerName mysite
ServerAlias mysite
DocumentRoot "F:/Drive/Dev/mysite"
<Directory "F:/Drive/Dev/mysite">
AllowOverride All
Options Indexes FollowSymLinks Includes ExecCGI
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName mysite2
ServerAlias mysite2
DocumentRoot "F:/Drive/Dev/mysite2"
<Directory "F:/Drive/Dev/mysite2">
AllowOverride All
Options Indexes FollowSymLinks Includes ExecCGI
Require all granted
</Directory>
</VirtualHost>
and the host file:
127.0.0.1 mysite
127.0.0.1 mysite2
I have tried several suggestion found here, but non of them helped...
Thanks in advance.
ngrok creates a secure public URL (https://yourapp.ngrok.io) to a local webserver on your machine
test mobile apps against a development backend running on your machine.
https://ngrok.com/

Apache gives me 403 Access Forbidden when DocumentRoot points to two different drives

I am getting an 403 access forbidden when attempting to open a page under a vhost where the document root is sitting on a different drive than where apache is sitting. I installed using the apachefriends release. This is my httpd-vhosts.conf file:
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
ServerName foo.localhost
DocumentRoot "C:/xampp/htdocs/foo/public"
</VirtualHost>
<VirtualHost 127.0.0.1>
ServerName bar.localhost
DocumentRoot "F:/bar/public"
</VirtualHost>
When opening bar.localhost in my browser, Apache is giving me 403 Access Forbidden. I tried setting lots of different access rights, even full rights to everyone, but nothing I tried helped.
Edit: Thanks! For future reference, add 'Options indexes' within to show directory indexes.
You did not need
Options Indexes FollowSymLinks MultiViews Includes ExecCGI
AllowOverride All
Order Allow,Deny
Allow from all
Require all granted
the only thing what you need is...
Require all granted
...inside the directory section.
See Apache 2.4 upgrading side:
http://httpd.apache.org/docs/2.4/upgrading.html
Somewhere, you need to tell Apache that people are allowed to see contents of this directory.
<Directory "F:/bar/public">
Order Allow,Deny
Allow from All
# Any other directory-specific stuff
</Directory>
More info
For Apache 2.4.2: I was getting 403: Forbidden continuously when I was trying to access WAMP on my Windows 7 desktop from my iPhone on WiFi. On one blog, I found the solution - add Require all granted after Allow all in the <Directory> section. So this is how my <Directory> section looks like inside <VirtualHost>
<Directory "C:/wamp/www">
Options Indexes FollowSymLinks MultiViews Includes ExecCGI
AllowOverride All
Order Allow,Deny
Allow from all
Require all granted
</Directory>
I have fixed it with removing below code from
C:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf file
<VirtualHost *:80>
ServerAdmin webmaster#dummy-host.example.com
DocumentRoot "c:/Apache24/docs/dummy-host.example.com"
ServerName dummy-host.example.com
ServerAlias www.dummy-host.example.com
ErrorLog "logs/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster#dummy-host2.example.com
DocumentRoot "c:/Apache24/docs/dummy-host2.example.com"
ServerName dummy-host2.example.com
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>
And added
<VirtualHost *:80>
ServerAdmin webmaster#localhost
DocumentRoot "c:/wamp/www"
ServerName localhost
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" common
</VirtualHost>
And it has worked like charm
Solved 403: Forbidden when visiting localhost. Using ports 80,443,3308 (the later to handle conflict with MySQL Server installation)
Windows 10, XAMPP 7.4.1, Apache 2.4.x My web files are in a separate folder.
httpd.conf - look for these lines and set it up where you have your files, mine is web folder.
DocumentRoot "C:/web"
<Directory "C:/web">
Changed these 2 lines.
<VirtualHost *:80>
ServerAdmin webmaster#localhost.com
DocumentRoot "C:/web/project1"
ServerName project1.localhost
<Directory "C:/web/project1">
Order allow,deny
allow from all
</Directory>
</VirtualHost>
to this
<VirtualHost *:80>
ServerAdmin webmaster#localhost.com
DocumentRoot "C:/web/project1"
ServerName project1.localhost
<Directory "C:/web/project1">
Require all granted
</Directory>
</VirtualHost>
Add your details in your hosts file
C:\Windows\System32\drivers\etc\hosts file
127.0.0.1 localhost
127.0.0.1 project1.localhost
Stop start XAMPP, and click Apache admin (or localhost) and the wonderful XAMPP dashboard now displays! And visit your project at project1.localhost

Resources