I am using postman to test an API I have, all is good when the request does not contain sub-domain, however when I add a sub-domain to URL I am getting this response.
Could not get any response
There was an error connecting to http://subdomain.localhost:port/api/
Why this might have happened:
The server couldn't send a response:Ensure that the backend is working
properlySelf-signed SSL certificates are being blocked:Fix this by turning off
'SSL certificate verification' in Settings > GeneralProxy configured incorrectly Ensure that proxy is configured correctly
in Settings > ProxyRequest timeout:Change request timeout in Settings > General
If I copy the same URL from postman and paste it into the browser I get a proper response, is there some kind of configurations I should do to make postman work with sub-domains?
Best Answer
First Go to Settings in Postman:
Configure
Apache
:If above changes resulted in
404
response, then continue reading ;-)Users that host their site locally (like with
XAMP
and/orWAMP
), may be able to visit their virtual-sites usinghttps://
prefixed address, but it's a lie, and to really enableSSL
(for each virtual-site), configure Apache like:Open
httpd-vhosts.conf
file (fromApache
'sconf/extras
directory), in your preferred text-editor.Change virtual-site's settings, into something like:
Finally, test by visiting local-site in browser, but using
http://
(without S) prefixed address; Apache should now give error like: