1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

How do I change ServerName in httpd.include

Discussion in 'Plesk for Linux - 8.x and Older' started by rp4000, Dec 14, 2005.

  1. rp4000

    rp4000 Guest

    0
     
    How do I change ServerName in httpd.include?

    I could not find a Plesk option to do this.

    Thanks
     
  2. jlschwab

    jlschwab Guest

    0
     
    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 ;)
     
  3. phoenixisp

    phoenixisp Silver Pleskian

    27
    57%
    Joined:
    Feb 2, 2002
    Messages:
    840
    Likes Received:
    0
    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.
     
  4. rp4000

    rp4000 Guest

    0
     
    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:
     
  5. cyrus1u1

    cyrus1u1 Guest

    0
     
    are there some other files to be changed? because it's not working, its always redirecting to the default set domain.
     
  6. phoenixisp

    phoenixisp Silver Pleskian

    27
    57%
    Joined:
    Feb 2, 2002
    Messages:
    840
    Likes Received:
    0
    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
     
  7. cyrus1u1

    cyrus1u1 Guest

    0
     
    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?
     
  8. phoenixisp

    phoenixisp Silver Pleskian

    27
    57%
    Joined:
    Feb 2, 2002
    Messages:
    840
    Likes Received:
    0
    It may sound silly, but have you cleared your browser's cache?
     
  9. phoenixisp

    phoenixisp Silver Pleskian

    27
    57%
    Joined:
    Feb 2, 2002
    Messages:
    840
    Likes Received:
    0
    Another question - did you install the cert in the "Server" control panel or the domain's panel?
     
  10. cyrus1u1

    cyrus1u1 Guest

    0
     
    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.
     
  11. rp4000

    rp4000 Guest

    0
     
    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.
     
  12. cyrus1u1

    cyrus1u1 Guest

    0
     
    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:
     
Loading...