Dnsmasq stopped working for no reason - osx-yosemite

I started using Dnsmasq on OSX Yosemite to resolve all *.dev domains to 192.168.10.10 IP address, which is Laravel Homestead's default.
It worked for me, but after sleeping and waking my Macbook, it stopped working.
I have followed steps of this tutorial, at first and it worked. It seems like all needed files are still there, but now when I go to anything.dev, it loads forever and then timeouts.
I do have a dev file at /etc/resolver with following content:
nameserver 192.168.10.10
Please help.

Related

Starting Stencil - Localhost URL Never Loads

I'm new to developing with Stencil, and I'm having a bit of trouble getting started.
After running:
stencil start
I get the startup information, and ASCII graphic loading in terminal, along with the localhost URLs which should allow me to view the frontend and work on the store. Whenever I visit the http://localhost:3000 URL, nothing ever loads.
It seems that something is in fact working, because when I edit and save a SCSS file, I get a terminal line recognizing that a file was changed.
I'm running on macOS High Sierra, v. 10.13.3
I've tried uninstalling and reinstalling stencil-cli, along with the JS utilities a dozen times and also tried different versions of Node -- namely 4.4.0, 6.10.3, and 7.9.0
Is there anything else I can do to troubleshoot? I sat down with a coworker and ran through the setup on their machine and everything worked perfectly. This must be an isolated issue somehow to my machine, but I'm not sure how to proceed.
Any help would be greatly appreciated.
Thank you!
The issue was has been resolved. The following lines were completely missing from my hosts file:
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost

localhost refused to connect - MAMP Pro

There seem to be a few questions that are similar but could not find the answer.
An hour ago (and the months before that :-)) everything was working fine. It looks like after updating to XCode 9.2 things stopped working.
I've justed updated to MacOS High Sierra 10.13.2 as there were some Apache updates included, but it didn't solve the issue. Maybe the XCode update changed something to the httpd.conf file? I'm not too familiar with the settings in there, so I'm unable to determine if something changed in that file.
Error in Chrome:
This site can’t be reached
www.example.dev refused to connect.
ERR_CONNECTION_REFUSED
My setup:
MacOS High Sierra 10.13.2
MAMP Pro 4.2 (latest version)
Ports are Apache: 80 and MySQL: 3306
VPN is off
If I run sudo nano /private/etc/hosts it has the following entries (I run my local website on www.example.dev)
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
127.0.0.1 www.example.dev # Note; I added this myself a long time ago as else the URL including www doesn't work
127.0.0.1 example.dev # MAMP PRO - Do NOT remove this entry!
::1 example.dev # MAMP PRO - Do NOT remove this entry!
What I tried:
Changing ports to default MAMP ports (Apache: 8888 and MySQL: 8889). No luck
If I run apachectl configtest in terminal it returns Syntax OK
UPDATE
Just saw that if MAMP Pro is off:
It still gives the same error in Chrome
It still returns Syntax OK with apachectl configtest
When I run sudo apachectl stop it returns /System/Library/LaunchDaemons/org.apache.httpd.plist: Could not find specified service
UPDATE 2
Out of frustration I downloaded Firefox to check and... all my local dev sites work there! In Chrome I still get the same error, even after clearing browsing data.
Turns out, Chrome (and Safari as well) were redirecting to https, so https://www.example.dev. And the problem was the .dev TLD.
If you run into the same problem (force forward by Chrome to https) and:
You DON'T use .dev, read this post for possible solutions
You DO use .dev as your local TLD, you need to change it to something else. Chrome redirects .dev TLDs to https since version 63. See this article and your best alternative TLDs here.

WAMP localhost redirects to my IP

I had to recently wipe my PC and I'm setting up my development environment again using WAMP.
After installing WAMP, if I visit http://localhost instead of seeing the WAMP homepage I get redirected to http://x.x.x.x, where x.x.x.x is my IP.
I had this issue on another PC and after setting the inbound rules for Apache HTTP Server in my Windows Firewall settings to allow all domains it fixed the issue. I applied this to my PC, and the issue does not seem to be present for Internet Explorer, whereas for Chrome and Firefox the localhost to my IP redirect issue persists even after clearing the cache for each browser.
My C:\Windows\System32\drivers\etc\hosts file looks like this:
127.0.0.1 localhost
::1 localhost
and my firewall rules look like this:
I am not currently using vhosts and I'm on a network at my workplace (if that has any implications?)
I also encountered the same issue when using Laragon which uses vhosts and whenever I visited a virtual host, e.g. mysite.dev it didn't work properly either.
My question on the Laragon forum: https://forum.laragon.org/topic/126/accessing-mysite-dev-redirects-to-url-which-shows-index-php-at-root-folder/3
The Problem
I'm behind a proxy which is used for browsing the web at my workplace. The proxy seemed to be messing up the dns resolution whenever I made a call to localhost (when using wamp) or one of my vhosts (when using Laragon).
This was clear as when I ran the following from the command line: ping site.dev I was getting the expected response from 127.0.0.1. However, when going to site.dev in my browser I was getting redirected to my IP, so essentially my etc/hosts file was being ignored for dns resolution.
The difference between the two being that the browser is using the proxy whereas the command line isn't!
The Solution
After trying many different solutions which seemed to work for localhost (on wamp) only, but not vhosts (on Laragon) I finally got to the solution which was actually so simple!
So, for chrome I simply went to chrome://settings/ > Network - Change proxy settings > LAN Settings > Proxy Server - Advanced
Then in the Exceptions text box I added the following:
*.dev;localhost;127.0.0.1
Here's a screenshot of my settings from Chrome/Internet Options
And that did the trick! Hope this can help someone else.

Apache is not running from XAMPP

I have IIS and skype like things on my system. So, i changed my port from 80 to 8081 and PID from 443 to 4433 or any other. And it was working after installation well and good. But then i restarted my system again. Apache didn't run and i tried to stop the ports and also changes my PORT and PID but it's still not working. Can anyone help me on this situation and i don't under all this now.
these are the I have done this too
I have installed xampp. but apache is not starting showing is program can't start because api-ms-win-crt-runtime-I1-1-0. dil is missing from your computer. Try reinstalling the program to fix this program

Apache Shutdown unexpectedly (nothing seems to work!)

I've tried just about everything (expect for re-installing xampp) everyone's suggested doing, but Apache just won't run anymore on my setup. It did for a few days, but stopped randomly. I changed nothing before it's demise.
Here's my setup (& some of what I've tried already):
I'm using xampp 1.8.3 (apache version: 2.4.9)
Nothing else is taking up Port 80 or 443 - I've checked multiple times!
I don't have Skype installed
IIS isn't installed (nor are any other server related systems)
I tried changing the ports via httpd.conf & restarting my computer
I tried changing the port settings via the Service Settings in xampp's control panel configuration
tried a previous system restore point (when it worked)
Not sure what to try next. Help?