Welcome Guest. Please Login or Register  


You are here: Index > AMPPS > General Support > Topic : AMPPS domain resolution issue on Mac



Threaded Mode | Print  

 AMPPS domain resolution issue on Mac, Hosts file redirection to mydomain.com causes redirection to localhost, not localhost/mydomain.com (5 Replies, Read 5308 times)
cspeegle
Group: Member
Post Group: Newbie
Posts: 3
Status:
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.
IP: --   

AMPPS domain resolution issue on Mac
Rishi_P
Group: Member
Post Group: Elite Member
Posts: 317
Status:
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.
IP: --   

AMPPS domain resolution issue on Mac
cspeegle
Group: Member
Post Group: Newbie
Posts: 3
Status:
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 :)
IP: --   

AMPPS domain resolution issue on Mac
twitchblade
Group: Member
Post Group: Newbie
Posts: 10
Status:
unfortunately editing the httpd-vhosts.conf file didn't work for me.  Always directs to the root. 
IP: --   

AMPPS domain resolution issue on Mac
twitchblade
Group: Member
Post Group: Newbie
Posts: 10
Status:
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.
IP: --   

AMPPS domain resolution issue on Mac
Bugs
Group: Member
Post Group: Newbie
Posts: 4
Status:
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

IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is July 3, 2020, 8:32 pm.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.199