Softaculous


Topic : AMPPS domain resolution issue on Mac


Posted By: cspeegle on June 1, 2017, 3:00 pm
I have an entry in my hosts file redirecting a URL to localhost for use in AMPPS, mydomain.com. In AMPPS, I have set up the domain mydomain.com. This worked up until ~December, when I believe there was some sort of update or patch. Since then, when I go to mydomain.com, it directs me to the index of localhost, where I then have to click the link to mydomain.com. The address resolves to mydomain.com/mydomain.com. I have tried various configuration changes and several clean installs, but I have accomplished nothing but proving the "sure sign of madness" adage.

Wordpress handles localhost/mydomain just fine, but my personal vanilla projects use root-relative architecture so localhost/mydomain is not an option. If this is a known issue, or if someone else has experienced this and fixed it, I would appreciate a hand. Since December, I have moved over to a CentOS server on VirtualBox so this is not slowing down my production (and I learned a lot of CLI too, so the net result has been good). It's just annoying not to know what the issue is.

Posted By: Rishi_P on June 12, 2017, 6:46 am | Post: 1
Hi,

Open Apache Configuration and check vhost conf is added or not.

To open Apache config : AMPPS Panel --> Apache Settings --> Click on Configuration.

In config file search for following line:
#Include conf/extra/httpd-vhosts.conf

Remove only '#' and save the file.

Posted By: cspeegle on June 12, 2017, 9:42 pm | Post: 2
I accessed the file in question. The line you mention is already uncommented.

Following the spirit of your advice, I went to the httpd-vhosts.conf file and sure enough, the vhosts file had an improper configuration. I never thought to check this, as I assumed that AMPPS would configure the vhosts file correctly (and it always had before). I simply changed the name of the VirtualHost from 127.0.0.1:80 to mydomain.com:80 and now my site works as intended.

I consider this issue resolved now. Thank you for your input, as you led me right to the solution :)

Posted By: twitchblade on December 14, 2017, 6:12 pm | Post: 3
unfortunately editing the httpd-vhosts.conf file didn't work for me.  Always directs to the root. 

Posted By: twitchblade on December 14, 2017, 6:20 pm | Post: 4
scratch that...It's working now and I'm not really sure why.  May have been some combination of setting php version to 5.6 and then back to 7 and restarting may have made this work.

Posted By: Bugs on April 16, 2020, 1:40 pm | Post: 5
I get the same problem.- in Apache conf, the line Include conf/extra/httpd-vhosts.conf is well uncommented.- The httpd-vhost.conf file seems well configurate.

But if some of my localhost domain are working well, other not. They redirect like described in this post.

When I set up a new wordpress install on a new localhost domain, it doesn't work. I get the same redirect. mynewsite.localhost resolves to localhost. And when I then have to click the link to mynewsite.localhost, it resolve to mynewsite.localhost/mynewsite.localhost.

The last one display a landing page of wordpress with no picture, no css. You can see what it looks like on the screenshot.
Can someone help me ?
Thank you


Powered By AEF 1.0.8 © 2007-2008 Electron Inc.