UCC & Setting Server Hostname
UCC & Setting Server Hostname
How do we set a friendly server hostname? For example in WHM/Cpanel you can set it to any name you want to the primary domain so for us it would be servername.zinuxcorp.com , we want to set it to hansel.zinuxcorp.com so that our UCC will apply SSL security to the user login.
Any assistance on setting this would be greatly appreciated.
Any assistance on setting this would be greatly appreciated.
Last edited by jhewit on Tue Nov 19, 2013 3:36 pm, edited 1 time in total.
Re: Server Hostname
You can do this only by editing internal vesta configuration. Open /usr/local/vesta/nginx/conf/nginx.conf and right before ssl directives add following condition
tst.vestacp.com should be replaced with relevant domain name. To apply changes restart internal vesta server
Code: Select all
if ($http_host != tst.vestacp.com) {
rewrite (.*) https://tst.vestacp.com:8083$1;
}
Code: Select all
service vesta restart
Re: Server Hostname
After setting this I cannot access the server control panel at https://hansel.zinuxcorp.com:2083 and when I attempt to access the server using the direct IP address it attempts to load https://hansel.zinuxcorp.com:2083 . Do I need to set the hostname elsewhere? Thank you again for the amazing support.
Re: Server Hostname
Also one other thing we applied the UCC to the primary domain, however the certificate is not applying to the mail server (mail.zinuxcorp.com) although it is covered under the SSL. Where do we replace the SSL certs for the mail server?
Re: Server Hostname
It's using the port 8083. :)jhewit wrote:After setting this I cannot access the server control panel at https://hansel.zinuxcorp.com:2083 and when I attempt to access the server using the direct IP address it attempts to load https://hansel.zinuxcorp.com:2083 . Do I need to set the hostname elsewhere? Thank you again for the amazing support.
So in your case it will be https://hansel.zinuxcorp.com:8083
Re: UCC & Setting Server Hostname
Sorry http_host should also include the port. Here is right config for you
and Ocrion said default por is 8083 not the 2083
To fix seconf issue just add mail.zinuxcorp.com as alias to zinuxcorp.com and it will do the trick
Code: Select all
if ($http_host != hansel.zinuxcorp.com:8083) {
rewrite (.*) hansel.zinuxcorp.com:8083$1;
}
To fix seconf issue just add mail.zinuxcorp.com as alias to zinuxcorp.com and it will do the trick
-
- Posts: 14
- Joined: Mon Apr 13, 2015 6:23 pm
Re: UCC & Setting Server Hostname
I'm unclear now. Does that one statement get both http and https ?
Another unclear point for me is where exactly is
Is this the complete change or are there more steps ?
Code: Select all
if ($http_host != hansel.zinuxcorp.com:8083) {
rewrite (.*) hansel.zinuxcorp.com:8083$1;
}
In nginx.conf there is a sectionright before ssl directives
and then lower down in # Vhost there are directives for SSL, but all within the Vhost brackets.# SSL PCI Compliance
Code: Select all
# Vhost
server {
listen 8083;
server_name _;
root /usr/local/vesta/web;
charset utf-8;
ssl on;
ssl_certificate /usr/local/vesta/ssl/certificate.crt;
ssl_certificate_key /usr/local/vesta/ssl/certificate.key;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
error_page 404 /error/404/index.html;
error_page 403 /error/index.html;
error_page 500 /error/index.html;
location / {
expires max;
index index.php;
}
Is this the complete change or are there more steps ?