Page 1 of 1
install works on localhost:8888 but navigation does not
Posted: Sat Mar 11, 2017 12:00 pm
by jolarti
I can't seem to find a proper solution for this.
Installing CMSMS 2 on my localhost (MAMP on a Mac) works perfectly, with all tests and connections to the database passing, but after installation, none of the links or navigation work - because all url's delete the "8888" that I have after my localhost.
I don't want to take off the 8888 in my MAMP settings because I have multiple CMS's installed (and they all work fine on this host).
Any ideas?
Re: install works on localhost:8888 but navigation does not
Posted: Sat Mar 11, 2017 2:46 pm
by Jo Morg
jolarti wrote:I don't want to take off the 8888 in my MAMP settings because I have multiple CMS's installed (and they all work fine on this host).
I don't see the point... I have tons of installations of CMSMS on my localhost and they all work fine without having to use non standard ports for that. I keep moving installations around and from and to remote servers without issues either (safe the occasional stubborn hoster that persists in having substandard server environments). What I use is either virtual hosts in WAMP, which I assume it's the same in MAMP, aliases, sub-folders which are the easiest to use, or even mocking domains that I have setup for testing purposes. All work fine and only setting up domains on a local server needed some googling around before I could set them up, but after that it was pretty easy and straightforward.
jolarti wrote:(...) none of the links or navigation work - because all url's delete the "8888" that I have after my localhost (...)
At this point I can't say if it is a bug or as designed, I don't have time to fiddle with that right now but, as you may have noticed, it's a pretty rare requirement and probably not the best way to achieve what you need. It would be the last way of setting up multiple installations of any script I would think of using...
Re: install works on localhost:8888 but navigation does not
Posted: Sat Mar 11, 2017 6:47 pm
by jolarti
I don't understand what you don't "see the point" of.
Do you mean: you don't see the point of keeping 8888 in MAMP?
Or do you mean you don't know what point is causing an error..?
Re: install works on localhost:8888 but navigation does not
Posted: Sat Mar 11, 2017 8:25 pm
by Jos
Don't know for sure but maybe it helps to add this line to your config.php
Code: Select all
$config['root_url'] = 'http://localhost:8888';
Re: install works on localhost:8888 but navigation does not
Posted: Mon Mar 13, 2017 8:55 pm
by velden
I could reproduce this issue.
It has been fixed already in version 2.2 which currently is in public beta.
For CMSMS 2.1.x the fix/work-around is setting the $config['root_url'] like Jos already suggested.
Note that you can use a protocol relative url if you want to do so
e.g.:
Code: Select all
$config['root_url'] = '//localhost:8888'
If you're using multiple host/domain names then have a look at
host_whitelist setting and note that you should include the port number there but NOT the protocol!
e.g.:
Code: Select all
$config['host_whitelist'] = 'localhost:8888,domain2:8888';