我需要确定Java中端口80上运行的Web服务器(IIS,Apache,Jetty).
有没有解决方案通过端口80获取信息?
Thanx和reguards
斯特凡
我有一个fedora服务器.我通过yum包管理器安装了tomcat.然后我在webapps文件夹上部署了nexus war.我尝试使用jsvc在端口80上运行服务器并且无法正常工作.我看到你也可以使用port fowarding.什么是最好的选择?
我跟着3.8.从sonatype doc 运行代理服务器后面的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>
Run Code Online (Sandbox Code Playgroud)
/家庭/纪尧姆/ 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
Run Code Online (Sandbox Code Playgroud)
当我试图访问
http://localhost:8081/nexus/index.html 一切正常http://localhost/nexus/index.html 一切正常http://example.com/nexus/index.html 只是挂起(端口80在防火墙中打开)
$ netstat -tulpn …
正在尝试从 Xampp 安装和启动 Apache... 错误消息:“检测到问题!端口 80 正在被 PID 为 4 的“无法打开进程”使用!” 在之前的帖子中没有找到答案。
ctrl+alt+del >details give: PID4: Système et mémoire compressée fichier ntoskrnl.exe, fin de tâche不可能
Xampp 建议:“重新配置 Apache 和控制面板以侦听不同的端口”
端口 80 出现在
- apache config > httpd.conf (listen 80) and Servername localhost: 80 - confif > service and port settings > only for Apache mainport 80
正如一些帖子所建议的那样,将这两个值更改为 8080 就足够了吗?
感谢您的任何建议
这个问题对于Tomcat 8.5来说是独一无二的,其他答案仅适用于7并且不能按照描述工作
首先,我一直在研究tomcat文档和在线问题20个小时.我已经从头开始构建我的服务器大约十次以学习该过程并尝试获得一个清晰的指南,以便运行服务器以运行多个Spring启动Web应用程序.
我现在不能让tomcat在端口80上运行,所以在域名末尾没有"8080".它在8080端口运行很好.
"netstat -lnp grep 80"告诉我这个:
enterProto Recv-Q Send-Q Local Address Foreign Address
State PID/Program name
tcp 0 0 0.0.0.0:3306 0.0.0.0:*
LISTEN 449/mysqld
tcp 0 0 0.0.0.0:111 0.0.0.0:*
LISTEN 1/init
tcp 0 0 0.0.0.0:22 0.0.0.0:*
LISTEN 143/sshd
tcp6 0 0 :::8001 :::*
LISTEN 139/httpd
tcp6 0 0 127.0.0.1:8005 :::*
LISTEN 281/java
tcp6 0 0 :::8009 :::*
LISTEN 281/java
tcp6 0 0 :::21 :::*
LISTEN 147/vsftpd
tcp6 0 0 :::22 :::*
LISTEN
Run Code Online (Sandbox Code Playgroud)
所以没有使用端口80. systemctl status tomcat.service = running
firewall-cmd …
我有这个程序,它现在应该只侦听端口 80 并从浏览器连接或其他 python 脚本接收数据。这段代码:
import socket # Import socket module
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
host = socket.gethostname() # Get local machine name
port = 80 # Reserve a port for your service.
s.bind(("192.168.252.7", port)) # Bind to the port
s.listen(5) # Now wait for client connection.
while True:
c, addr = s.accept() # Establish connection with client.
print 'Got connection from', addr
print c.recv(1024)
c.close() # Close the connection
Run Code Online (Sandbox Code Playgroud)
这都是从tutorialspoint复制的。此代码接收数据,当端口设置为 80 以外的任何内容时(例如 8080、12345),但是当它设置为 80 时,它只接受客户端但似乎没有收到任何数据,尽管数据从其他地方成功发送。 .. 请帮助伙计们