Home > Enterprise >  How to find out if apache on windows is running on http or https
How to find out if apache on windows is running on http or https

Time:01-22

Can it be found through powershell script or batch file?

How to find out if apache on windows is running on http or https

CodePudding user response:

You could use php and php info to get a lot of information about your apache server.

<?php

// Show all information, defaults to INFO_ALL
phpinfo();

// Show just the module information.
// phpinfo(8) yields identical results.
phpinfo(INFO_MODULES);
?>

For https your need to have a cretificate. Your Apaches file called httpd.conf will also tell you how your server is confirured. Your Apache log files will also provide you with a lot of information on errors raised when calling or processing a url.

CodePudding user response:

You can use PowerShell to check if the standard ports for HTTP and HTTPS are in listening state:

Get-NetTCPConnection -State 'Listen' -LocalPort 80, 443

Or you can check on which ports the Apache process is listening:

Get-NetTCPConnection -State 'Listen' -OwningProcess (Get-Process -Name httpd).Id -ErrorAction SilentlyContinue

You might want to check that your Apache process is actually called httpd.

  • Related