port

How to assign as static port to a container?

这一生的挚爱 提交于 2019-12-17 19:18:02
问题 I want to assign a container a port, so that it gets the same port after every restart of the container. Example: I have a container, which has an Apache in it. The Apache runs on port 80 inside the container. Now, after starting the container, docker assigns a host port to the container port, for example: 49154 -> 80. But the host port changes after restart, depending on the number of running containers. I tried to specify the port in the config.json file of the container, but it gets

Apache won't run in xampp

早过忘川 提交于 2019-12-17 17:34:16
问题 I have just installed XAMPP and everything works fine except that I can't get apache to run. It seems that port 80 is the problem, I have disabled Skype to use port 80 but it doesn't seem to fix it. I read somewhere that the SSL port can be the problem and should be changed. But I cant figure out were the port is or how to change it. "Check the "/xampp/apache/logs/error.log" file" I have tried to check this file but inside "logs" there isn't anything. From apache I can go to error but there

How to check if a network port is open on linux?

廉价感情. 提交于 2019-12-17 17:28:44
问题 How can I know if a certain port is open/closed on linux ubuntu, not a remote system, using python? How can I list these open ports in python? Netstat: Is there a way to integrate netstat output with python? 回答1: You can using the socket module to simply check if a port is open or not. It would look something like this. import socket sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) result = sock.connect_ex(('127.0.0.1',80)) if result == 0: print "Port is open" else: print "Port is not

Multiples domains pointing to differents ports in apache server

折月煮酒 提交于 2019-12-17 16:54:22
问题 I am working with a web development framework which publish its applications in apache server ports:8080, 8081, 8082, etc. For instance MyApp1 runs in localhost:8080, MyApp2 runs in localhost:8081, and so on. What I would like to achieve is that my domains point to a "port" where its application is running in my apache web server, e.g. www.mydomainclient1.com should point to 8080 port and www.mydomainclient2.com should point to 8081 port. What I have done is I have entered to my Domain Name

Opening up a port with powershell

半城伤御伤魂 提交于 2019-12-17 16:13:39
问题 On Machine A I am running a port scanner. On Machine B I would like to open and close ports in an organized fashion. I am hoping to do all of this via powershell. I found THIS script to run on Machine B however when scanning the same port from Machine A it still says that it is closed. Do any of you know how I can successfully open a port on Machine B 回答1: Avoid COM if possible. You can use TcpListener to open a port: $Listener = [System.Net.Sockets.TcpListener]9999; $Listener.Start(); #wait,

Docker ports are not exposed

别来无恙 提交于 2019-12-17 15:13:33
问题 I set up a simple node server in Docker. Dockerfile FROM node:latest RUN apt-get -y update ADD example.js . EXPOSE 1337 CMD node example.js example.js var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'+new Date); }).listen(1337, '127.0.0.1'); console.log('Server running at http://127.0.0.1:1337/'); Now build the image $ docker build -t node_server . Now run in container $ docker run -p 1337:1337 -d

Listen additional port Microsoft Azure Nodejs

雨燕双飞 提交于 2019-12-17 07:53:14
问题 I'm running nodejs application (Azure Web App) on port process.env.PORT (1337), default port on Microsoft Azure. Also I need to listen additional port for websocket. On my local I'm using 8000, but seems, that it's closed on Azure. Are there any additional ports, that I can listen and is it actually possible at all? 回答1: If you're deploying to an Azure Web App, only ports 80 and 443 are public-facing. This maps to a specific port for your app to listen to, retrievable via process.env.PORT .

Changing default port (i.e. 5037) on which adb server runs

限于喜欢 提交于 2019-12-17 06:13:12
问题 I am a budding android developer and if there is no easy way of configuring the adb server to run on another port then the inflexibility of the tools will force me to quit android app development. A web search did not return any solutions. I also searched for '5037' in all files in android sdk directory but did not find a setting there. 回答1: Use the environment variable ANDROID_ADB_SERVER_PORT to select the port. The following works under bash: $ export ANDROID_ADB_SERVER_PORT=12345 $ adb

Changing default port (i.e. 5037) on which adb server runs

冷暖自知 提交于 2019-12-17 06:12:05
问题 I am a budding android developer and if there is no easy way of configuring the adb server to run on another port then the inflexibility of the tools will force me to quit android app development. A web search did not return any solutions. I also searched for '5037' in all files in android sdk directory but did not find a setting there. 回答1: Use the environment variable ANDROID_ADB_SERVER_PORT to select the port. The following works under bash: $ export ANDROID_ADB_SERVER_PORT=12345 $ adb

On localhost, how do I pick a free port number?

∥☆過路亽.° 提交于 2019-12-17 04:38:14
问题 I'm trying to play with inter-process communication and since I could not figure out how to use named pipes under Windows I thought I'll use network sockets. Everything happens locally. The server is able to launch slaves in a separate process and listens on some port. The slaves do their work and submit the result to the master. How do I figure out which port is available? I assume I cannot listen on port 80 or 21? I'm using Python, if that cuts the choices down. Thanks! 回答1: Do not bind to