On Mon, 2014-02-10 at 17:46 +0100, jack linkers wrote:
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax
I have no nginx folder under /etc, therefore I can’t
edit /etc/nginx/sites-available/file_to_edit
I believe this folder comes with the package apt-get install nginx by
default
But how do I edit my .vhost from source build please ?
Thanks !
the sites-available / sites-enabled pair of directories is not something
that comes by default - a number of package managers have used it to
mimic the apache method.
You have installed into /usr/local/nginx, with your config stored in
conf below that, so any includes in nginx.conf are relative
to /usr/local/nginx/conf, unless you put an absolute path in there.
look at the end of the nginx.conf file, and you’ll see
include conf.d/*.conf;
or maybe
include /usr/local/nginx/conf/conf.d/*.conf;
This is the folder where you put your vhosts.
If you want to do it the apache way, add
include sites-enabled/*
and put your config files there.
Alternatively, build your nginx to mimic the default install. I use this
script to build up with pagespeed… you may want to play with it, as
I’m using Amazon linux / 1.5.10 / openssl that supports ECDHE ciphers
and a few other odds and sods ( the starting point is the output from
nginx -V from the version that comes with your distro )
–8<–
./configure --prefix=/etc/nginx
–sbin-path=/usr/sbin/nginx
–conf-path=/etc/nginx/nginx.conf
–error-log-path=/var/log/nginx/error.log
–http-log-path=/var/log/nginx/access.log
–pid-path=/var/run/nginx.pid
–lock-path=/var/run/nginx.lock
–http-client-body-temp-path=/var/cache/nginx/client_temp
–http-proxy-temp-path=/var/cache/nginx/proxy_temp
–http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp
–http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp
–http-scgi-temp-path=/var/cache/nginx/scgi_temp
–user=nginx
–group=nginx
–with-openssl-opt=“enable-ec_nistp_64_gcc_128”
–with-http_ssl_module
–with-http_spdy_module
–with-http_realip_module
–with-http_addition_module
–with-http_sub_module
–with-http_gunzip_module
–with-http_gzip_static_module
–with-http_random_index_module
–with-http_secure_link_module
–with-http_stub_status_module
–with-http_dav_module
–with-http_xslt_module
–with-mail
–with-mail_ssl_module
–with-file-aio
–with-debug
–with-sha1=/usr/include/openssl
–with-md5=/usr/include/openssl
–add-module=…/ngx_pagespeed-1.7.30.3-beta
'–with-cc-opt=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic ’
–8<–
hth,
Steve
Steve H. BSc(Hons) MIITP
Linkedin: http://www.linkedin.com/in/steveholdoway
Skype: sholdowa