Welcome! Log In Create A New Profile

Advanced

Problem with to multiple virtual hosts

May 08, 2018 01:46AM
We use nginx for Hosting multiple hosts. We have haves mixes, some sites are only available at http:// and other sites are available with https://

We create a new config-file for every virtual hosts (domain) if there is a new customer with a new Homepage. All works correctly.

Today we create 2 new config-files on the nginx, copy the file to sites-enabled and make a nginx reload.

Now, no sites works again. But there was no error after the nginx reload.

In the Browser we get the error that the Site is not available. And we get this error at all Sites.

In the nginx error.log we get the message *2948... no "ssl_certificate" is defined in server listening on SSL port while SSL handshaking, client: 178...., server 0.0.0.0:443

In the Log-Files are many of these messages, i think ~20 lines of this.

The Virtual-Host config File we create look like:

server {
listen 80;
server_name example.de;
return 301 http://www.$http_host$request_uri;
}
server {
listen 80;
server_name *.example.de;
location / {
access_log off;
proxy_pass http://example.test.de;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwareded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_sestheader Connection "upgrade";
}
}

We get the error only if we create a new virtual-host file in the sites-enabled. if we copy the code into a exisiting virtual host file it works correctly and all other sites works again.

Any Ideas why it doesn't work if we create a new file? We deleted the new file, create it again but always get the same effect with the error Message in the error-log file.

I don't know if its important but we have 196 Files in the sites-enabled directory. If we create a new one the error come again, if we delete the file and write (copy&paste) the same code into a existing file, it works correctly?!

We don't think that is a ssl error, we think that the count of files are the problem?!

We want to create always a new virtual-host config-file for each customer and don't edit add the config to a existing file.
Subject Author Posted

Problem with to multiple virtual hosts

auto May 08, 2018 01:46AM

Re: Problem with to multiple virtual hosts

Francis Daly May 09, 2018 04:12PM

Re: Problem with to multiple virtual hosts

auto May 11, 2018 04:17AM

Re: Problem with to multiple virtual hosts

Francis Daly May 13, 2018 07:12PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 189
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready