-1

I am facing an issue with configuring domain name in my httpd.conf file. Entry in httpd.conf file.

Listen sample.com:443

<VirtualHost sample.com:443>

SSLEnable

ServerName MyIHSInstalledServerName

</VirtualHost>

KeyFile /serverPath/keyfile.kdb

SSLDisable

SSLTrace

Now I am confused on what should be the entry made in /etc/hosts {IP} sample.com sample. Here what is the IP I should mention and is my entry in httpd.conf file correct? Please help.

dush
  • 211
  • 4
  • 15

1 Answers1

0

Your /etc/hosts file is not really relevant to your Apache config.

For SSL virtual hosts, use either the actual ip address that you want your SSL httpd daemon to be bound to

eg

<VirtualHost 10.1.1.1:443>

or use:

<VirtualHost _default_:443>

which will bind the daemon to the first ip address not in use by any other SSL virtual host, which should work in the vast majority of cases

The name of the service is only relevant to the ServerName directive. If you include that, the httpd daemon will only respond to requests that include that name in the header.

Garreth McDaid
  • 2,427
  • 22
  • 34