Welcome! Log In Create A New Profile

Advanced

2 host on same directory

Posted by madzombie 
2 host on same directory
June 15, 2010 08:55AM
hi,
i use a nginx server. And create one virtual host on nginx. This host is http protocol.

Ex. the host : test.xxx.com, and i want to use https host. store.xxx.com

i want to same directory for two host. how can i do ?

Thanks.
Re: 2 host on same directory
June 15, 2010 12:44PM
[code]
server {
listen 80;
server_name test.xxx.com;
root /path/to/directory;
...
}

server {
listen 443;
server_name store.xxx.com;
root /path/to/directory;
... # SSL stuff here
...
}
[/code]

--
Jim Ohlstein
Re: 2 host on same directory
June 16, 2010 03:41AM
ok. thanks.
But i have a problem.

i get an error. The error message :

[code]
2010/06/16 09:06:56 [emerg] 19275#0: SSL_CTX_use_PrivateKey_file("/home/glsy.csr") failed
(SSL: error:0906D06C:PEM routines:PEM_read_bio:no start line error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib)
[/code]

What could be the problem ?

Thanks.
Re: 2 host on same directory
June 16, 2010 09:24AM
Please see http://nginx.org/en/docs/http/configuring_https_servers.html, specifically http://nginx.org/en/docs/http/configuring_https_servers.html#chains. Your problem may be here. You may also want to read http://wiki.nginx.org/NginxHttpSslModule.

--
Jim Ohlstein
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 109
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready