Я использовал инструкции по следующей ссылке:Настройка Uberjar с Nginx на цифровой океан VPS
"Hosting Clojure Web Apps in 7 Easy Steps"
Я знаю, что uberjar работает, потому что я тестировал как на моем Dev машины и VPS.
Просто Nginx, похоже, не в состоянии его найти. Я подозреваю, что это что-то делать с этим сайтом код:
# Web sockets
location /chsk {
proxy_pass http://backend/chsk;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
... но я не знаю, как это исправить ... спасибо за помощь!
Еще одна вещь: на «upstream backend» в файле сайта я пробовал и 127.0.0.1:3000 И 0.0.0.0:3000 без успеха.
Вот сайт по умолчанию конфигурационный:
server {
# Replace this port with the right one for your requirements
listen [::]:80 ipv6only=off;
# Multiple hostnames separated by spaces. Replace these as well.
server_name clmitchell.net www.clmitchell.net main.clmitchell.net
books.clmitchell.net dna.clmitchell.net help.clmitchell.net
history.clmitchell.net svcs.clmitchell.net;
server_name_in_redirect off;
root /data/nginx/www/$host;
error_page 401 /error/401.shtml;
error_page 402 /error/402.shtml;
error_page 403 /error/403.shtml;
error_page 404 /error/404.shtml;
error_page 500 501 502 503 504 /error/500.shtml;
location ^~ /error/ {
internal;
root /data/nginx/www/www.clmitchell.net;
}
access_log /var/log/nginx/$host-access.log;
error_log /var/log/nginx/error.log;
index index.php index.html index.htm default.html default.htm;
# Support Clean (aka Search Engine Friendly) URLs
location/{
try_files $uri $uri/ /index.php?$args;
}
# serve static files directly
location ~* \.(jpg|jpeg|gif|css|png|js|ico)$ {
access_log off;
expires max;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
location ~ \.scm$ {
include fastcgi_params;
fastcgi_intercept_errors on;
# By all means use a different server for the fcgi processes if you need to
fastcgi_pass 127.0.0.1:9981;
}
location ~ /\.ht {
deny all;
}
}
Я удалил history.clmitchell.net из списка имен серверов.
Вот текущая история сайта конфигурация:
upstream backend {
server 104.131.29.212:3000 fail_timeout=0;
}
server{
listen [::]:80 ipv6only=off;
server_name localhost history.clmitchell.net;
access_log /var/log/hist_access.log;
error_log /var/log/hist_error.log;
root /var//resources/public;
# Web sockets
location /chsk {
proxy_pass http://backend/chsk;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
# Static assets
location/{
try_files $uri @backend;
}
# The backend server
location @backend {
proxy_pass http://backend;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off;
}
}
был дубликат «слушать» директиву о истории сайте конфигурации, который я удалил ... но по какой-то причине я все еще получаю ошибку: '
sudo nginx -t nginx: [emerg] duplicate listen options for [::]:80 in /etc/nginx/sites-enabled/hist:6 nginx: configuration file /etc/nginx/nginx.conf test failed
Ссылка на учебник позади вашей конфигурации мертва. Исправьте это, пожалуйста. –
Нет, это не так ... Я просто на нем и проверил ссылку в моем вопросе. – Quasaur
Тогда я задаюсь вопросом, что такое 'http: //% 22Hosting% 20Cllojure% 20Web% 20Apps% 20in% 207% 20Easy% 20Steps% 22' должно означать. –