我有一个fedora服务器。我通过yum包管理器安装了tomcat。然后我在webapps文件夹中部署了nexus war。 I tryed using jsvc在端口80上运行服务器并且不起作用。我看到你也可以使用port fowarding。什么是最好的选择?如何在端口80上运行nexus sonatype?
编辑1:httpd的
我跟着从Sonatype的文档3.8. Running Nexus Behind a Proxy和我有点困惑。 我安装了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>
/家庭/纪尧姆/ WWW /关系/ 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是错误的:nslookup example.com
决心x.x.x.x
当我的IP是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
}
我也看到了这个http://wiki.ivonet.nl/display/LINUX/Install+or+Upgrade+Sonatype+Nexus –
这个答案已经过时了,因为一个存在码头的世界。现在,非常希望在端口80上的容器中运行应用程序服务器。 –