A
A
Anton Misyagin2016-05-19 20:58:54
Nginx
Anton Misyagin, 2016-05-19 20:58:54

How to set up my ubuntu server? Or what am I doing wrong?

First, I will ask a question so that it is not lost among the text. How to install nginx+passenger correctly? on ubu server 16.04
I’ll immediately note that everything written below rolls on ubuntu 14.04 and does not roll on 16.04. I really want a new OS))))
nginx -t
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)
2016/05/ 19 20:47:00 [emerg] 13204#13204: unknown directive "passenger_ruby" in /etc/nginx/nginx.conf:14
nginx: configuration file /etc/nginx/nginx.conf test failed

So. There is a clean computer on which I put ubuntu server 16.04.
First, I put ruby ​​with handles:

sudo apt update -y
sudo apt upgrade -y
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable --ruby=2.1.5

Ruby with rvm installs successfully. I reboot.
Next, I put the rest of the software that I need.
Wrote a script to install the software:
#!/bin/sh
echo "install ntpdate:"
apt install ntpdate
echo "install nodejs:"
apt install -y nodejs
echo "install unzip:"
apt install -y 
# for pg gem
sudo apt install libpq-dev -y
echo "install java8:"
add-apt-repository ppa:webupd8team/java
apt update
apt install -y oracle-java8-installer
echo "install postgresql:"
apt install -y postgresql
echo "install redis:"
apt install -y redis-server
echo "install git:"
apt install -y git
echo "install imagemagick:"
apt install -y imagemagick
echo "install bundler:"
gem install bundler --no-rdoc --no-ri
echo "install rails 4.2.5:"
gem install rails -v 4.2.5 --no-rdoc --no-ri
echo "install backup 4.2.0:"
gem install backup -v 4.2.0 --no-rdoc --no-ri
echo "install nginx+passenger:"
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 561F9B9CAC40B2F7
apt install -y apt-transport-https ca-certificates
# Add our APT repository
sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger xenial main > /etc/apt/sources.list.d/passenger.list'
apt update
# Install Passenger + Nginx
apt install -y nginx-extras passenger

The software installation log is attached in the comments.
Please note that nginx without passenger ended up in the end of the log!
Next, I deploy via Capistrano. It completely passes, loads the config for nginx (good, working, checked on ubuntu server 14.04) and plugging at the very end at the start of nginx:
[email protected]:~$ nginx -t
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)
2016/05/19 20:49:14 [emerg] 13510#13510: unknown directive "passenger_ruby" in /etc/nginx/nginx.conf:14
nginx: configuration file /etc/nginx/nginx.conf test failed

Answer the question

In order to leave comments, you need to log in

4 answer(s)
Александр Карабанов, 2016-05-19
@karabanov Куратор тега Ubuntu

Выставьте правильные права на файл /var/log/nginx/error.log
Установите nginx-extras c поддержкой passenger
PS
Как установить passenger на nginx?

I
Ivan Bogachev, 2016-05-19
@sfi0zy

And I really want a new OS))))

The desire to have a newly appeared axis on the server is not the best desire. It makes sense to wait a bit until version 16.04.1.
Returning to the previous point - a week ago there were no official passenger binaries for Ubuntu 16.04. There are no installation instructions on the official site for 16.04. Did you even check what you added there? And look carefully at the installation log: you install passenger from the standard Ubuntu repository.
[email protected]:~$ nginx -t
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)

The user running nginx must have write permissions to the specified file.
config for nginx (good, working, tested on another OS)
unknown directive "passenger_ruby" in /etc/nginx/nginx.conf:14

You have included everything except what is mentioned in your errors. Perhaps you have some problems in /etc/nginx/nginx.conf , or maybe again something is wrong with the rights. But most likely - everything will be decided by installing passenger from oss-binaries.phusionpassenger.com/apt/passenger for Ubuntu 16.04 (when it appears there). In the meantime, do not rush - Ubuntu 14.04 will be supported for a few more years - you will have time to upgrade.

M
matperez, 2015-07-31
@emtecif

Check your php version. If below 5.4, then it's about the support of short array syntax.

D
Dmitry Threy, 2015-07-31
@more_cry

I didn’t enter something, but why are the values ​​of the execute function passed in the form [$url]? Is this something new in PHP 5.4? Sorry for the offtopic, but I just never rose above 5.3 ~ and it became interesting. Or was it still in older versions and I'm just an ignoramus?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question