S
S
Semyon Semyonov2014-07-14 19:25:50
Nginx
Semyon Semyonov, 2014-07-14 19:25:50

Why doesn't nginx (in conjunction with unicorn) start on port 80?

1. For some reason, port 8080 is busy, so I launched unicorn on port 8081:
listen 8081, :tcp_nopush => true
I ran it like this:

bundle exec unicorn -E production -c config/unicon.rb

After starting, I go to test.com:8081 and see that the application is running
2. I start nginx, for which the config says:
server {
    listen 80;
    server_name test.com;
   root /var/www/apps/testapp/public;

I do the launch like this:
sudo /etc/init.d/nginx start
3. I go to test.com:8081 - the application is working. I go to test.com:80 and see:
403 Forbidden
nginx/1.2.1

Three questions:
a) why is it so?
b) how to make sure that nothing happens on test.com:8081, but the application works on test.com:80?
c) how to run unicorn as a daemon, otherwise I don't like switching between tabs?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
sim3x, 2014-07-14
@man_without_face

read what is written in the logs

cd /var/log
ls 
less nginx/nginx.log
q

in mana, the setting goes through the socket, you decided to do it from some diva through the port
What OS you have, we never found out

P
Puma Thailand, 2014-07-14
@opium

Try to read at least one manual for setting up such a bundle, a question from the category I made complete garbage, without delving into the configs for a single gram, why did I get garbage, because I made garbage, but I wanted candy, and I didn’t do candy, I did garbage.

M
Mikhail Osher, 2014-07-14
@miraage

I'm not strong in unicorn, but in the nginx php-fpm bundle - fastcgi_pass goes.
I guess we need to do something similar.
RTFM in general. :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question