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: FQDN in browser changed to hostname
Author
durwin



Joined: 21 Sep 2017
Posts: 2
Location: New Mexico

PostPosted: Thu 21 Sep '17 20:45    Post subject: FQDN in browser changed to hostname Reply with quote

This is an internal web server.
Apache 2.4 running on Fedora 26.
In a browser, on any machine,
after entering,
https://host.mydomain.com/
browser changes it to,
https://host/
This of course generates a certificate error.

I have other servers running same versions
and they do not do this. I have tried comparing
configurations but cannot find anything which causes
this.

Here are the only site files I have.
autoindex.conf
php.conf
ssl.conf
welcome.conf

The log files (error, access, ssl_error, ssl_access)
did not show any messages.

Edited:
I changed ssl.conf log level in <VirtualHost _default_:443> to debug and this showed in ssl_error.

[Fri Sep 22 10:05:32.023544 2017] [ssl:info] [pid 21582] [client 172.23.93.249:51768] AH01964: Connection to child 3 established (server gandalf.mydomain.com:443)
[Fri Sep 22 10:05:32.023919 2017] [ssl:debug] [pid 21582] ssl_engine_kernel.c(2135): [client 172.23.93.249:51768] AH02044: No matching SSL virtual host for servername gandalf found (using default/first virtual host)
[Fri Sep 22 10:05:32.023977 2017] [ssl:debug] [pid 21582] ssl_engine_kernel.c(2135): [client 172.23.93.249:51768] AH02044: No matching SSL virtual host for servername gandalf found (using default/first virtual host)
[Fri Sep 22 10:05:32.023993 2017] [core:debug] [pid 21582] protocol.c(2223): [client 172.23.93.249:51768] AH03155: select protocol from , choices=h2,http/1.1 for server gandalf.mydomain.com
[Fri Sep 22 10:05:32.033642 2017] [ssl:debug] [pid 21582] ssl_engine_io.c(1367): (70014)End of file found: [client 172.23.93.249:51768] AH02007: SSL handshake interrupted by system [Hint: Stop button pressed in browser?!]
[Fri Sep 22 10:05:32.033664 2017] [ssl:info] [pid 21582] [client 172.23.93.249:51768] AH01998: Connection closed to child 3 with abortive shutdown (server gandalf.mydomain.com:443)

Thank you,

Durwin
Back to top
James Blond
Moderator


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

PostPosted: Tue 31 Oct '17 19:02    Post subject: Reply with quote

Hi Durwin,
did you edit the host file on the computer on which you use the browser? Or is there a rewrite rule to force that name? What did you set the ServerName to?
Back to top
durwin



Joined: 21 Sep 2017
Posts: 2
Location: New Mexico

PostPosted: Tue 31 Oct '17 19:18    Post subject: Reply with quote

Thank you for reply.

I did not add anything to hosts file. No rewrite rules.
Hosts file is.
Code:
127.0.0.1      localhost.localdomain localhost
::1                localhost6.localdomain6 localhost6

Only one additional conf file (the ones which are by default added) in /etc/http/conf.d/

Code:
<VirtualHost *:443>
   ErrorLog logs/ssl_error_log
   TransferLog logs/ssl_access_log
   LogLevel debug

   ServerAdmin root@mycompany.com
   DocumentRoot /var/www/html/one/
   ErrorLog /var/log/httpd/error_log
   CustomLog /var/log/httpd/access_log combined
   LogLevel debug
   SSLEngine On
   # Set the path to SSL certificate
   # Usage: SSLCertificateFile /path/to/cert.pem
   SSLCertificateFile /etc/pki/tls/certs/mycompany.crt
   SSLCertificateKeyFile /etc/pki/tls/private/mycompany.key
   ServerName gandalf.mycompany.com
   ServerAlias gandalf.mycompany.com
   ProxyPreserveHost On
   ProxyPass / http://gandalf.mycompany.com/
   ProxyPassReverse / http://gandalf.mycompany.com/
</VirtualHost>
Back to top


Reply to topic   Topic: FQDN in browser changed to hostname View previous topic :: View next topic
Post new topic   Forum Index -> Apache