###前提・実現したいこと
nginxを起動させcapistranoでデプロイしたrailsアプリケーションを起動させたいです。
###発生している問題・エラーメッセージ
sudo service nginx startコマンドを実行。
nginx を起動中: nginx: [emerg] unknown directive ":sample.conf" in /etc/nginx/conf.d/sample.conf:2
ディレクトリにないというのがよく理解できず、検索したのですが該当記事がなく対応ができません。
スペルミスの部分があるのかなととも考えたのですが、
わからず投稿致しました。
###該当のソースコード
/etc/nginx/conf.d/sample.conf
:sample.conf upstream staging { server unix:/tmp/unicorn.staging.sock; } server { listen 80 default_server; server_name xxx.xx.xxx.xx; access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; root /home/deploy/staging/current/; location / { location ^~ /staging { proxy_pass http://staging; } } } ~
###補足情報(言語/FW/ツール等のバージョンなど)
・capistrano3
・rails5
・CentOS release 6.8 (Final)
・nginx version: nginx/1.10.2
関係あるのかわかりませんが、
nginxのバージョン確認時以下の内容が返ってきました。
nginx version: nginx/1.10.2 built by gcc 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC) built with OpenSSL 1.0.1e-fips 11 Feb 2013 TLS SNI support enabled configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --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-file-aio --with-threads --with-ipv6 --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_ssl_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/01/25 12:24
2017/01/25 12:28
2017/01/25 12:32
2017/01/25 12:38
2017/01/25 12:41
2017/01/25 12:42
2017/01/25 12:45
2017/01/25 12:57
2017/01/25 13:01