windows 2008 DNS Website without www? - windows

I have a site on my server that only works with a www.
example:
http://www.dartmouthplayers.ns.ca/
works but without it, it does not.
http://dartmouthplayers.ns.ca/
But the site's bindings has both listed:
and the DNS has the blank host record:
What did I not set right?
It's odd because:
http://dartmouthplayers.ns.ca/ - returns a 500 error
and http://randomtexthere.dartmouthplayers.ns.ca/ - returns a server not found error
thanks!

I would ask this on serverfault.com. From my end, http://dartmouthplayers.ns.ca/ works fine and http://www.dartmouthplayers.ns.ca/ is returning a 500. DNS looks fine as both resolve to 74.84.132.101. It looks like an IIS configuration problem.

Related

HTTP 500 Internal Server Error with special signs URL

I have developed a Laravel API for my SPA. Sometimes I'm using query parameters to provide data to the API. But if there's an # sign inside the API URL the server responds with a 500 - Internal Server Error. Example...
Here I will get the error:
http://www.mywebsite.com/api/user/login?name=example.user#gmail.de&password=changeMe
Here everything works fine:
http://www.mywebsite.com/api/user/login?name=exampleUser&password=changeMe
Locally both ways are working. But when tested on the live server the error occurred.
Does anyone know what the problem is? I'm using an Apache Server with Plesk, if it helps. ;-)
Ok, I've solved the problem. If someone else has the same error:
Just set the server-sides default charset to utf-8 fixed that problem!

Postman can't reach localhost

I am in a corporate env so I have to use a proxy to reach servers. This works well in postman and in browsers. What I can't reach is localhost in postman but I can reach localhost in the browser.
I am running Postman for Linux Version 6.0.9. I have tried reaching localhost:9082/rest/myapi.... and 127.0.0.1:9082/rest/myapi with both global proxy and system proxy turned on and with either turned on and with non turned on. In all cases I am not able to reach localhost.
What I get as an response is an error page from the proxy server! Someway the call gets out on the network instead of being kept on my machine.
The postman console:
My request headers are:
Cache-Control →no-cache
Connection →Keep-Alive
Content-Length →986
Content-Type →text/html; charset=utf-8
Pragma →no-cache
Proxy-Connection →Keep-Alive
My response headers are:
cache-control:"no-cache"
pragma:"no-cache"
content-type:"text/html; charset=utf-8"
proxy-connection:"Keep-Alive"
connection:"Keep-Alive"
content-length:"986"
My response body is an html page.
How can I make a call to localhost work with postman?
I was having similar issue with HTTP calls to local ASP.NET Core Web API apps. Changing the proxy settings didn't fix it for me.
Finally fixed it by turning off File > Settings > General > SSL Certificate Verification
I have the same issue. What works for me is:
Open File -> Settings -> Proxy
Then, enable proxy and put 127.0.0.1 : 80, if your web server runs on 80.
In the git thread, they say it is a known issue, so hopefully it will get resolved soon.
I solved this by Turning off System proxy of Postman.
Open File -> Settings -> Proxy
Then Turn off Use System Proxy
#Menuka Ishan Answer is correct. But in mac only if we change the turn off proxy won't work. You need to turn off the SSL Certificate verification also you need to disable.
I found a temporary solution:
In terminal, go to the directory where postman is installed and add:
machine#dev:~/Documents/Postman$ export NO_PROXY=localhost,127.0.0.1
machine#dev:~/Documents/Postman$ ./Postman
This will make calls to localhost work.
I found a similar problem on Windows machines here
The problem mentioned as an issue here. You should just write a simple batch file like this:
set HTTP_PROXY=
set http_proxy=
set HTTPS_PROXY=
set https_proxy=
START %LOCALAPPDATA%\Postman\Update.exe --processStart "Postman.exe"
open a simple text file, save this as a ".bat" file, and just run it!
I also faced the same issue, but the trick was I implemented both the methods that were stated earlier in the stack.
First I turned off the postman proxy as shown in below image.
Click Settings -> Proxy
And then turned off the SSL certificate verification check button.
Click Settings -> General
And then tried to hit my local server and finally it worked.
While attempting to Get https://localhost:5001/WeatherForecast via PostMan while developing a basic .NET Core (3.1) Web API (on Ubuntu Linux)
I got the error:
Could not get any response There was an error connecting to
https://localhost:5001/WeatherForecast.
I didn't notice the actual solution in the things to try at first, but if you check the highlighted text in the image you will see it.
You can see that the option is turned on in PostMan by default:
I turned the SSL Certificate Verification off and tried again and it worked.
If you are under corporate proxy and you are deploying your webapplication in localhost then no need to set proxy configuration like
http://username:password#corporateProxyServer:ServerPort in postman (Global Proxy Configuration).
As the app is deployed in local machine just use the localhost configuration in setting -> Global Proxy Configuration as :
proxy server : 127.0.0.1
port : 8300 (this is the port where the web application is running )
My problem was that i was setting an invalid Header token and it gave me the error
Error: Header name must be a valid HTTP token ["Accept "]
Warning: This request did not get sent completely and might not have all the required system headers
Just check your Headers.
Adding another potential answer to this for people to check after they've tried the other ideas here.
I was able to solve my own problem by checking the Postman console (View -> Show Postman Console) and then examining the error from the request (in my case it was because I had a newline character on an auth token).
In my case, I had to precede the localhost with https://
These steps solved this issue after 1 whole day struggle:
1) HTTP_PROXY= proxy.company.com:port
HTTPS_PROXY=proxy.company.com:port
to user variables, not to System variables. Make sure the the case is all cap.
2) Updating newtwork driver, and turning on Windows Defender......Make sure you don't see no reds in here.
I was not able to make any calls from postman to docker container running Couchbase Server. Very frustrating. Turns out I had proxy setting configured to some aws instance which has been long deleted.
Goto setting and remove the proxy setting and it worked like a charm on localhost/127.0.0.1/mac laptop eno IP addr or 0.0.0.0
In my case, I was using django-tenants and had to add the domain for the tenant in etc/hosts to get it working on localhosts. My entry for 127.0.0.1 now looks like
127.0.0.1 localhost test.localhost
My problem was forgetting to select Environment. From the drop down where you see No Environment in the image, select the name of your environment.
Menuka Ishan's solution above saved my hours of pain! I left the Global Proxy Configuration switched ON and changed the Proxy Server to 127.0.0.1. Switched OFF the Use System Proxy. I already had the entry 127.0.0.1 localhost in my hosts file under the path C:\Windows\System32\drivers\etc.
If you have active proxy in your system then make sure Global Proxy Configuration and Use System Proxy are turned off. To do this go to Postman preferences > Proxy. You can also try sending a request in postman without typing localhost (e.g. :8080/send)
i think i also found a perfect fix.
First you turn on global proxy configurations, add your local machine Ip which is 127.0.0.1,then also add localhost in the bypass.
Also turn off SSL verification.
It worked for me
This worked for me, i dissable the parrameter host in the header.
HOST Disabled
If anyone is looking for a solution to WooCommerce local install, here are the steps to make this work:
Go to Wordpress Admin > WooCommerce > Settings > Advanced
Create new API key, give it a name
Copy the Consumer Key & Consumer Secret to
your text editor
Open Postman
Create new connection Set the URL for
testing (GET) : http://mylocalsite/wp-json/wc/v3/orders (change
"mylocalsite" to yours)
Click on Authorization tab
Now here is the main change: Although in WC Rest docs, it says to use the "Basic Auth" - IT WILL NOT WORK. Since usually your localhost is HTTP
and not HTTPS. So "Basic Auth" is not relevant in our case.
You will need to change the Authorization to OAuth 1.0
Set Consumer Key & Consumer Secret respectively as it shows in Woocommerce
Click "Send" - it should work now
If still you have problems, try one by one the following:
File > Settings > Turn off SSL Verification
File > Settings > Turn off "Automatically follow redirects"

XAMPP: your connection is not private NET::ERR_CERT_AUTHORITY_INVALID

I'm working in a virtual server on my 64bits windows 7 machine, and a few weeks this error start to appear on google chrome:
XAMPP: your connection is not private NET::ERR_CERT_AUTHORITY_INVALID
I've migrated to Opera to continue developing on my virtualhost, but today this error started to appear on Opera too.
i've searched on web and only answer i've had is:
Browsers are not accepting auto assigned certify anymore...
Anyone know how to bypass this validation on xampp virtualserver?
Just an update. In Chrome and Vivaldi insert chrome://flags/#allow-insecure-localhost into the address bar and then enable "Allow invalid certificates for resources loaded from localhost." Even changing the domain from example.dev to example.test didn't work until I changed the above setting in the browser.
I could fix a similiar issue by using a different host name. I used "website.dev" an got these error in Chrome 63 on Windows7. After changing the C:\Windows\System32\drivers\etc\hosts to "website.test" and the "httpd-vhosts.conf" accordingly, it works.
I had a same issue over my practicing laravel Vhost.
I changed "div" to "test" and typed "website.test" at the address bar, then it failed with the error, "ERR_CERT_AUTHORITY_INVALID". But if I typed "http://website.test" instead of the one I previously did, it worked. Since then it keeps working without "http://". So I think you need to remind windows TCP/IP hosts that your new host name needs a new mapping set.
You just need to change https:// to http://
Good luck, it worked for me
yes,the virtual host is only worked on browser without doing this: chrome://flags/#allow-insecure-localhost into the address bar and then enable "Allow invalid certificates for resources loaded.
Just change this:
changing the domain from example.dev to example.test.
and your virtual host gonna be work.the result is here in the below
I just changed the domain name from WEBSITE_NAME.dev to WEBSITE_NAME.test and it worked like a charm without me having to write "https://". Didn't had to enable insecure-host flag in chrome. It still shows "Not Secure" in the address bar, but works fine in displaying the website.

WordPress Website shows 403 error when accessing wp-admin/ajax.php page from front end

I am running a WordPress on an Azure Web app connecting to a MySQL server on a different Windows server. When loading the mentioned page in Chrome, it shows 2 popups 403 & Forbidden. Checking the console throws this error - ecbcc.js:2 POST /wp-admin/admin-ajax.php 403 (Forbidden)
This works fine on FireFox & IE but not on Chrome. Any ideas why?
This is because of your cache. Minified version of JS is causing the issue in chrome browser. Check or purge the cache and check for the permissions applied to cached files as well.
I faced the same issue but it took a long time for me to fix it. Because my solution was not caused by common things like cache, .htaccess, files permissions, etc. I apply all the possible solutions as described here. When nothing worked for me, then I talked with my hosting provider and the issue was on their side. Actually, the server has black-listed my IP.
Below is the reply from the support of my hosting provider:
After checking it, it looks like the issue is caused by trigger
ModSecurity rules.
ModSecurity is an Apache module that works as a web application
firewall. It blocks known exploits and provides protection from a
range of attacks against web applications. However, sometimes,
mod_security may incorrectly determine that a certain request is
malicious, while it is actually legitimate. In such a situation, we
can whitelist the triggered mod_security rule on the server, so that
you can bypass the block.
In order to properly investigate, we need you to share your IP address
with us. You can copy it from here: https://ip.web-hosting.com/
Looking forward to your response.
This error can appear for more than one reason. Except for the accepted answer, if you are using a shared hosting solution as a server then it would be best to contact the support of the service. Also if you use Plesk or Cpanel you can check the server logs to see if there is any false positive rule that from mod_security that catches the error. Then you can find the error that could look something like that:
ModSecurity: Warning. Match of "test file" against "REQUEST_FILENAME" required. [file "/etc/httpd/conf/modsecurity.d/rules/custom/006_i360_4_custom.conf"] [line "264"] [id "77140992"]
You can apply the ID on your firewall exclusion list (if this is provided by your hosting service) and then the server will not block the request anymore.
IMPORTANT: If you are not sure what you are doing, ask your hosting provider for support. Experimenting on live servers/sites is not the best option and I would strongly recommend avoiding it.

IIS 7.5 HTTP Error 401.2 - Unauthorized - Wierd

I have just set up a windows 2008 server and installed IIS on it.
The thing is while one web page working fine (2014.flptr.com) the other (www.flptr.com) is throwing above error. I triple checked they have same settings and they point to the same folder on the computer.
How come this may happen??
Any info appreciated!
THanks!
I changed the applicationHost.config file, replaced security information with the website's that is working. I guess it had something to do with IUSR account password.
THanks!

Resources