Instalando o servidor Yaws no Ubuntu 12.04 (usando um serviço de nuvem)

2

Estou tentando fazer com que um servidor da web Yaws trabalhe em um serviço de nuvem (Amazon AWS). Eu compilei e instalei uma cópia local no servidor. Meu problema é que não consigo fazer o Yaws rodar na porta 8000 ou na porta 80.

Eu tenho a seguinte configuração no yaws.conf:

port = 8000
listen = 0.0.0.0
docroot = /home/ubuntu/yaws/www/test
dir_listings = true

Isso produz o seguinte lançamento / resultado bem-sucedido:

Eshell V5.8.5 (abort with ^G)

=INFO REPORT==== 16-Sep-2012::17:21:06 === Yaws: Using config file /home/ubuntu/yaws.conf

=INFO REPORT==== 16-Sep-2012::17:21:06 === Ctlfile : /home/ubuntu/.yaws/yaws/default/CTL

=INFO REPORT==== 16-Sep-2012::17:21:06 === Yaws: Listening to 0.0.0.0:8000 for <3> virtual servers: - http://domU-12-31-39-0B-1A-F6:8000 under /home/ubuntu/yaws/www/trial -

=INFO REPORT==== 16-Sep-2012::17:21:06 === Yaws: Listening to 0.0.0.0:4443 for <1> virtual servers: -

Quando tento acessar o URL ( link ), ele nunca se conecta . Eu tentei usar paping para verificar se a porta 80 ou 8000 está aberta ( link ) e recebo um "host pode não ser resolvido "erro, então obviamente algo não está funcionando.

Eu também tentei configurar o yaws.conf para que ele esteja na porta 80, aparecendo assim:

port = 8000
listen = 0.0.0.0
docroot = /home/ubuntu/yaws/www/test
dir_listings = true

e recebo o seguinte erro:

=ERROR REPORT==== 16-Sep-2012::17:24:47 === Yaws: Failed to listen 0.0.0.0:80 : {error,eacces}

=ERROR REPORT==== 16-Sep-2012::17:24:47 === Can't listen to socket: {error,eacces}         
=ERROR REPORT==== 16-Sep-2012::17:24:47 === Top proc died, terminate gserv =ERROR REPORT==== 16-Sep-2012::17:24:47 === Top proc died, terminate gserv =INFO REPORT==== 16-Sep-2012::17:24:47 === application: yaws exited: {shutdown,{yaws_app,start,[normal,[]]}} type: permanent {"Kernel pid terminated",application_controller," {application_start_failure,yaws,>>>>>>{shutdown,>{yaws_app,start,[normal,[]]}}}"}

Eu também abri a porta 80 usando o iptables. Executando o sudo iptables -L dá esta saída:

Chain INPUT (policy ACCEPT) target prot opt source destination
ACCEPT tcp -- ip-192-168-2-0.ec2.internal ip-192-168-2-16.ec2.internal tcp dpt:http      
ACCEPT tcp -- 0.0.0.0 anywhere tcp dpt:http ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp dpt:http ACCEPT tcp -- anywhere anywhere tcp dpt:http

Chain FORWARD (policy ACCEPT) target prot opt source destination

Chain OUTPUT (policy ACCEPT) target prot opt source destination

Além disso, fui ao painel do grupo de segurança na área de configuração do Amazon AWS e adicionei as portas 80, 8000 e 8080 à fonte de ip 0.0.0.0

Por favor, note: se você tentar acessar a URL do servidor virtual agora, provavelmente não se conectará porque eu não estou executando atualmente o daemon Yaws. Eu testei quando eu tenho bouba ou através de bouba ou bouba -i

Obrigado pela paciência

    
por Lee Torres 20.09.2012 / 11:11

1 resposta

0

Se você colocar o serviço na porta 8000, precisará usar a porta 8000 em sua URL. Por exemplo:

http://ec2-72-44-47-235.compute-1.amazonaws.com:8000/

Além disso, verifique seu Elastic IP e verifique se ele ainda está associado à instância.

    
por 18.10.2012 / 00:54