Change Apache server port dynamically (not manually, through programmatically) - port

I have installed Apache 2.4 in windows successfully, It is working.
Now I want to change the listening port dynamically (Not manually. meant to say, open a file and edit the port), might be place any properties file and read port from this or passing port as parameter to hhtpd.exe while starting server. Ultimately I have to configure port externally.

not possible. Use a script that changes it and gracefully restarts the server, or you won't be able to do it otherwise.

Related

Is it possible with DOCKER (or on the host) to detect an HTTP request and then redirect if the main server is down ? How?

I'm sure this is possible somehow, but never really had a need to do so previously. I have a bunch of Docker containers that run on an UBUNTU host. One of the containers is an NGINX server that serves as a webserver and reverse proxy. What I would like to do is setup some sort of 'switch' or mechanism on the host or preferably another device that does something like described below. The server does have production and development versions of the web applications, so I really just want to set a header if it is running but in maintenance.
Set up something on the host other device that indicates or detects the state of the NGINX server.
a. Running normally.
b. Running but undergoing maintenance (would have to be manually set into that mode)
c. Not running.
Depending upon the state in 1 it would do the following:
a. Just pass the request through to the server.
b. Pass through the request, but possibly set a header or something to indicate it is in maintenance mode.
c. Redirect the request to an external URL, basically the public facing page for the business.
Not really sure how to approach that since it seems that I would need an HTTP listener on the host, or possibly on a router or firewall or other device (we have a Fortigate and a Watchguard). That would check the HTTP request, and then take the appropriate action based upon what "mode" we are in. The UBUNTU host is pretty much bare bones, i.e. without Apache or another web server because everything is pretty much in the Docker package.
If I were to set that up on the Debian host, seems like we could just have an environment variable that defaults to PROD and then just set it to DEV when we are working on the code, and then set it back to PROD when we are done, and then the process would.
ping the DOCKER NGINX instance to see if it is running (i.e. status code).
if it is running and PROD, just forward on.
if it is running and DEV, set a header to indicate so and forward on.
if it is not running, redirect externally.
If the server is completely down though, that would fail.
Any ideas as to how to actually do that ? Ideally the 'processor' would not reside on the UBUNTU server at all and would always be running.

Windows firewall configuration for Weblogic server

I've got a Weblogic server environment setup that all works fine on my server - I've set up a Windows firewall inbound rule to expose ports 7001 & 7002, but all attempts to access the server (e.g. using curl commands) are still blocked by the firewall. When the firewall is disabled, everything (curl, Webserver console etc) works fine, so it looks like something else in my firewall that I need to configure but I can't figure out what else I need to do, any pointers? (Wireshark confirms correct ports are being specified in my calls)
There was a 'block' firewall rule on the Java exe - disabling this higher priority 'block' rule has sorted it by allowing the 7001/7002 'permit' rule to kick in.

Can't change default worldserver port in dockers build

I installed AzerothCore successfuly on Windows 10 Pro using Docker, and it works fine locally. I was trying to make the server public so friends can connect from the internet for testing.
Since port 8085 for worldserver can't be forwarded on my router (probably ISP or router firmware reserving it, other ports can just fine), I tried everything to change it in conf files, literally changed it everywhere and added the overrides in the 2 conf.dist. Changed it in the realmlist field in authserver DB too. Recompiled everything: it stays 8085 no matter what (I can see it using netstats).
In more detail: I changed the port to 8086 in \azerothcore-wotlk\docker\worldserver\etc\worldserver.conf.dist
added the line "WorldServerPort = 8086" in worldserver.conf and worldserver.conf.dockerdist in the same directory.
Even changed the port in .env.dist in main installation directory.
Also changed the relative field in the realmlist entry in authserver database.
I rebuilt all the containers from scratch after the config modifications and recomposed them: worldserver port stays 8085.
I managed to solve the problem with the help of Francesco Borzi: turned out dockers containers have their own ports exposed so I needed to change those too accordingly.
I edited the docker-compose.yml file in main directory, where ports for the world server container are listed, along with the usual editings of worldserver confs and authserver database entries as usual, and recomposed from scratch.
Thanks for help.
Remember you're using docker, you only change the port redirection in docker-compose.

Issues with Jenkins 1.67 URL set up

I am trying to set a new Jenkins instance (version 1.67) on to a Windows Server 2012 r2.
I am trying to configure a custom URL instead of using
localhost:8080
etc..
I have set Jenkins URL as
NewServer.domainname.com
But I cannot access it via that url, I get presented with a message "Remote Web Access is turned off" it only allows me to connect when I follow the URL with the port number;
NewServer.domainname.com:8080
I am sure that Remote web access is completely different from what my goal is.
By default, Jenkins launches its own built-in webserver, listening on port 8080.
Changing the URL in the Jenkins configuration does not change the port that the running webserver listens on, but rather the URL that is shown within the UI, or in emails sent to users etc.
In order to access Jenkins at just NewServer.domainname.com (i.e. running on port 80), you would first have to disable Windows Remote Web Access, which is currently occupying port 80.
You would then need to stop Jenkins and start it again with the flag --httpPort=80; these options are documented on the Jenkins wiki.
If Jenkins was started as a Windows Service, you can edit the jenkins.xml file as shown in these answers.
Just wanted to say, after setting Jenkins.xml to run on port 80, and then via the Jenkins web interface using
'install as service'
I found that this process seemed to create a new jenkins.xml along with the default httpPort which is stored within the Jenkins.war.
I get around this I installed as a service, ensured that the service was not set to start on start up. Rebooted the machine
On start up I re-edited the jenkins.xml httpPort value back to 80. Started the service and now running very happy!

What is SCBroker port in Siebel?

What is SCBroker port in Siebel server?
i learned that default SCBroker port is 2321, how can i change this default port.
this SCBroker interfering my application so need help to change the SCBroker port.
As stated in documentation:
The Siebel Connection Broker (alias SCBroker) component is a background-mode server component that provides intraserver load balancing. By default, it is always enabled and online. At least one instance of SCBroker must be running on any Siebel Server hosting interactive components.
...
SCBroker listens on a configurable, static port for new connection requests from the Web server or a third-party load balancer. The parameter, Static Port Number (alias PortNumber), defines the port that SCBroker monitors. The default value for this parameter is 2321.
So you can change mentioned "PortNumber" parameter using srvrmgr utility (Siebel Server Manager). Instructions how to use this utility are placed here. In short, you should connect to your server with the following command:
srvrmgr /g your_gateway /e your_enterprise /s your_siebel_server /u sadmin /p password
Then to verify current value of PortNumber parameter:
srvrmgr> list param portnumber for comp scbroker show PA_VALUE
To change parameter execute:
srvrmgr> change parameter portnumber=12345 for component scbroker
Where "12345" is new SCBroker port number. After that you need to bounce the component (note that server will be unavailable for users during restart):
srvrmgr> shutdown systemcomps
srvrmgr> startup systemcomps

Resources