I made a new conf file in sites-available (and linked it in sites-enabled) and now I want to "install" that conf file without resetting the nginx server.
As root, I can run nginx -c file.conf
since that almost does what I want; however, the conf files in sites-enabled seem to run within some other defined context when nginx starts because I always get the following error when running that command:
$ nginx -c /etc/nginx/sites-available/alpha
2010/09/30 02:32:13 [emerg] 31769#0: unknown directive "server" in sites-available/alpha:1
How can I dynamically run this new conf file?
$ nginx -v
nginx version: nginx/0.6.32
$ cat /etc/issue
Debian GNU/Linux squeeze/sid
$ cat /etc/nginx/sites-available/alpha
server {
listen 443;
server_name XXX.net;
ssl on;
ssl_certificate /etc/nginx/certificates/server.crt;
ssl_certificate_key /etc/nginx/certificates/server.key;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://127.0.0.1:1338;
}
}
I am using self-signed certificates.