私はfedoraサーバーを持っています。yumパッケージマネージャーを介してtomcatをインストールしました。次に、ネクサス戦争をwebappsフォルダーに展開しました。jsvcを使用してポート80でサーバーを実行しようとしましたが、機能しませんでした。ポートフォワーディングも使用できることを確認しました。最良の選択肢は何ですか?
編集1:httpd
私は3.8に従いました。sonatypedocからプロキシの背後でNexusを実行していると少し混乱します。httpdをインストールしました。次の構成があります。ここで、example.comは私のドメインです。
/etc/httpd/conf.d/nexus.conf
NameVirtualHost *:80
<VirtualHost *:80>
ServerName example.com
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /nexus/ http://localhost:8081/nexus/
ProxyPassReverse /nexus/ http://localhost:8081/nexus/
ProxyPreserveHost On
<Location />
Order allow,deny
Allow from all
</Location>
ErrorLog logs/nexus/error.log
CustomLog logs/nexus/access.log common
</VirtualHost>
/ home / guillaume / www / nexus / conf
# Jetty section
application-port=8081
application-host=0.0.0.0
nexus-webapp=${bundleBasedir}/nexus
nexus-webapp-context-path=/nexus
# Nexus section
nexus-work=${bundleBasedir}/../sonatype-work/nexus
runtime=${bundleBasedir}/nexus/WEB-INF
pr.encryptor.publicKeyPath=/apr/public-key.txt
アクセスしようとすると
http://localhost:8081/nexus/index.html
すべてが機能しますhttp://localhost/nexus/index.html
すべてが機能しますhttp://example.com/nexus/index.html
ハングするだけです(ポート80はファイアウォールで開いています)$ netstat -tulpn | grep:80
tcp 0 0 ::: 80 ::: * LISTEN 3965 / httpd
tcp 0 0 ::: 8081 ::: * LISTEN 3811 / java
udp 0 0 0.0.0.0:803 0.0.0.0:* 1051 / rpc.statd
そのプロキシを機能させる方法についての手がかりはありますか?
編集2:nginx
私はエラーを見つけました、DNSは間違っていました:私のIPがあったときにnslookup example.com
解決されましたx.x.x.x
x.x.x.y
しかし、私はngix構成を楽しんだ
server {
listen 80;
server_name example.com;
access_log off;
error_log off;
location / {
proxy_pass http://localhost:8081;
proxy_redirect off;
#Proxy Settings
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# would be a good idea to redirect static assets
}