yona-projects/yona

요나 아파치 연결

JEONGWon9 opened this issue · 5 comments

OS : CENTOS 7
DB: MARIA 10.4.22
JDK1.8
APACHE 2.4

사용중입니다

1.16설치를하고
bin/yona 진행시

[info] application - === Yona server starting initialization ===
[info] application - --- Config reading: ok! - 140 ms
[info] application - --- Property reading: ok! - 0 ms
[info] application - --- Pull request checking: ok! - 12 ms
[info] play - Starting application default Akka system.
[info] application - --- Notification mail scheduler: ok! - 153 ms
[info] application - --- Notification event cleanup scheduler: ok! - 1 ms
[info] application - --- Temporary files cleanup scheduler: ok! - 21 ms
[info] application - --- Basic access controller config reading: ok! - 2 ms
[debug] application - Registered AuthProvider 'google'
[debug] application - Registered AuthProvider 'github'
[info] play - Application started (Prod)
[info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000

라고 뜨며 정상작동이되는것같습니다 서버 쪽에 설치하여 127.0.0.1:9000 로 확인을 못하고
아파치와 연결해 확인할려고하는데

아파치와 연결하면 그냥 하얀 화면만 나타납니다.
documentRoot 문제인거같아 물어봅니다.

httpd.conf 설정입니다.
<VirtualHost *:80>
DocumentRoot "/data/yona-1.16.0"
..
..

<VirtualHost *:80>
..
ProxyPreserveHost on
ProxyPass / http://localhost:9000/ nocanon
ProxyPassReverse / http://localhost:9000/
ProxyTimeout 3600

파일을 yona자체를 실행할땐 에러가없이 정상적으로 작동하고
화면만 하얀 화면만 나옵니다 index.html을 못찾는거같아
폴더를 뒤져보니
share/doc/api/index.html 에 파일이있는거같아 경로를 잡아보니

Parse error: syntax error, unexpected 'version' (T_STRING) in /data/yona-1.16.0/share/doc/api/index.html on line 1
라고 에러만 뜹니다.. 혹시 제가뭔가 잘못한게있을까요??

데모서버에서는 아래와 같이 설정되어 있습니다.

Listen 80

<VirtualHost *:80>
  ServerName repo.yona.io
  Redirect permanent / https://repo.yona.io/
  ErrorDocument 503 503.html
RewriteEngine on
RewriteCond %{SERVER_NAME} =repo.yona.io
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [L,NE,R=permanent]
</VirtualHost>

ssl.conf 는 아래처럼 설정했구요. 인스턴스가 2개로 운영할때 기준이에요.

##
## SSL Virtual Host Context
##

<Proxy balancer://myset>
    BalancerMember http://127.0.0.1:9000
    BalancerMember http://127.0.0.1:9003
    ProxySet lbmethod=byrequests
</Proxy>

<VirtualHost _default_:443>

# General setup for the virtual host, inherited from global configuration

ProxyPreserveHost On
ServerName repo.yona.io
ProxyPass  /excluded !
ProxyPass  /robots.txt !
ProxyPass / "balancer://myset/"
ProxyPassReverse / "balancer://myset/"
ErrorDocument 503 http://yona.io/503.html

document root 는 아예 설정하지않으신건가요?

curl로 확인해보니 서버쪽에선 정상적으로 나오는데 ... 아파치 연결이 안되는건 대체 뭐가문제일까요... vhost,work properties,ssl conf 사용중인데.. 톰캣을쓰지않으니 worklist 에 추가 하진않는거같은데 .. 허어........

웹서버 동작이 아니라 웹 애플리케이션 응답이라 index.html 이 필요하지 않은 상황인데요 웹 서버가 그대로 동작해서 index.html 을 찾고 있는 상황처럼 보입니다.

Yona 데모서버에서는 해당 domain 으로 요청이 들어오면 reverse proxy 를 이용해 내부 포트 9000 으로 redirect 시켜서 응답을 하도록 만들었습니다.

감사합니다 프록시 쪽 문제인것같네요 정상 설치되었습니다 감사합니다~!