I have an Apache server configured in Ubuntu 16 on a machine with a fixed ip 192.168.1.130. In the default configuration, it is possible to access this server from other machines (of the same network) without problems. As I am working with sockets, I included SSL security certificates, leaving the file /etc/apache2/sites-available/ssl.conf configured in this way:
<IfModule mod_ssl.c>
<VirtualHost 192.168.1.130:443>
DocumentRoot /var/www/html
ServerName misitiolocal.com
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/misitiolocal.crt
SSLCertificateKeyFile /etc/apache2/ssl/misitiolocal.key
SSLCACertificateFile /etc/apache2/ssl/misitiolocal.ca-bundle.crt
<Directory />
Options FollowSymlinks
AllowOverride None
</Directory>
<Directory /var/www/html>
Options Indexes FollowSymlinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
</VirtualHost>
Then I configured the / etc / host file like this:
127.0.0.1 localhost <- así estaba
127.0.1.1 NombreDeLaMaquina <- así estaba
192.168.1.130 misitiolocal.com <- lo agregue yo
After enabling SSL mode in Apache with the new configuration and restarting the server, when entering from the same server, there is no problem. It works and resolves me well by ip and by name: https://misitiolocal.com
and the service is deployed correctly.
But when entering from another machine (same local network) I get the error "DNS_PROBE_FINISHED_NXDOMAIN" which tells me that there is an error in the DNS resolution. In fact, when I enter from IP 192.168.1.130, I change it to the domain name https://misitio.com
, but the same error appears (that is, it sees the ip, it tries to resolve the name, but it can not). As an antecedent I have ping to 192.168.1.130 from other machines, but I do not have ping to misitiolocal.com
-The / var / www folder has the corresponding permissions for www-data -I do not want to configure the host file of the client machines (which are in windows) because it should resolve even if a new machine arrives.
Open questions:
- Could it be router configuration issue?
- May I have another configuration in Apache?
- or do you definitely have to mount a DNS server on the server machine?
Advice and help are welcome