• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

How do I change ServerName in httpd.include

R

rp4000

Guest
How do I change ServerName in httpd.include?

I could not find a Plesk option to do this.

Thanks
 
With plesk you cannot change the default main servername in the httpd.include, its actually not a good idea to edit httpd.include at all, instead use the vhost.conf overrides.

The plesk system automatically makes www.domain.tld the default apache server name, and thats just that ;)
 
Are you trying to change the hostname? After all, that's what the ServerName is. This can be changed and is a two step process. From shell do:

#hostname <new.host.name>

Then in the control panel go to Server - Server Preferences

There you must change it as well. This has worked for me several times on a RedHat flavor OS.
 
I found that the reason my SSL certificate does not work is because ServerName is set to domain.com rather than www.domain.com. I manually edited httpd.include, restarted Apache and my certificate now works. I'm not sure I really want the hostname to be www.domain.com but I'm also not sure if it matters if it is :confused:
 
are there some other files to be changed? because it's not working, its always redirecting to the default set domain.
 
Check your /etc/hosts file. There should be 2 entries

127.0.0.1 localhost.localdomain localhost
your IP host.domain.com host

Of course place your IP and server name on line 2
 
It seems to work now, thank you. I have an additional question about ssl. I have the crt, I implemented the crt in plesk, but when I double click de key at the bottom of the page.. I just can see the plesk crt, not the real one...any ideas?
 
Originally posted by phoenixisp
It may sound silly, but have you cleared your browser's cache?

yeah, i always do that, as well as restart the apache to make sure the changes were made.

I did install the cert in the server control panel and I put the cert as the default for the ip-address. The domainname is not created in plesk.
 
I found the easiest way to figure this out was to just look at and modify the http conf files until it was working then work backwards to figure out how to make Plesk do the same thing. Bear in mind you have to versions of httpd running - one for Plesk and the other for your web stuff. Check both sets of conf files to see what Plesk has done. Use openssl to inspect any key files that have been written.
 
i figured out that I just didn't see the icon "setup".. i had to select the cert and click setup, that's all.. :rolleyes:
 
Back
Top