We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11391
    • 7 Posts
    Hi,

    I am evaluating modx. I installed it on my box, but ports 80 and 443 are being used by something else. I am using 2 different #’s to represent http and https. I can do most things in the administrative console as expected, but if I navigate to the site, and click on any links I create, it always strips out the port number from the URL, and I therefore get a "page cannot be displayed" error on every link I click. Not good.

    Me thinks it a bug... but maybe there is a way to fix?

    Thanks.

    G

    • Could you set up a base href tag with the port number in it?
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 11391
        • 7 Posts
        Not as far as I can see. I put a check in "publish" and it put it in the navigation panel.

        Besides... it is bad practice to hardcode the domain name/ip address in the link. Becomes a nightmare if the site is ever ported or the domain name changes. Shouldn’t have to do that for internal links...
        • I don’t think you understood what I was saying. In your header place the following:
          <base href="http://site.com:port/></base>
          


          Immediately after your opening <head> tag.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 11391
            • 7 Posts
            Well, yes, you are right. I didn’t understand what you were saying! Sorry about that.

            But, if you can bear with me for just a little while longer...

            There are 2 problems I have here:

            1) I’m not sure what file you put that line into... wouldn’t that need to occur in the template? (I am thinking here that the template has the <head> declaration in it). Is that in the DB or is that somewhere on the drive? I’m still trying to figure out how modx works here...

            2) I’m natting. Machines on the inside can see the server on the normal http/https ports. It is on the outside they get natted to other ports, because the normal ports are already in use. If I put a line like that in the header, then it would mess up the people on the local network :0/ It really seems like modx shouldn’t take the liberty of rewriting the domain/port portion of the url...

            Thanks.
            • It goes in the template, in the <head> part.

              As far as your network configuration, that’s an interesting situation. If the browser has to specify a port number to access the site, then the port number has to be a part of the URL. That’s the standard. How else would you give people a correct URI if the port weren’t a part of it?

              Perhaps use a plugin to add the port number if the client is not coming from your intranet IP address?
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 11391
                • 7 Posts
                Please bear in mind, I’m evaluating this as a possible solution among other solutions. I cannot find any docs on how modx works, and between trying to figure it out and other CMSs... I haven’t gotten that far. I cannot commit too deeply until we are sure it is what we want to go with.

                The question is, where is the template? Is that somewhere in the db or is that on the file system?

                I do know that Joomla, Drupal, Compact CMS and others are not affected by the port issue. We have them all natted & on other ports as well with no issues.

                I suspect that in modx, that this has something to do with the .htaccess file in the root dir of the install... but I didn’t want to mess with it if it will screw something else up... esp. since that might not be where the problem lay. Was hoping there would be a quick answer for this smiley

                So far, I’m liking modx... I just wish there were some docs to speed along the learning curve.

                Thanks for the help.

                G
                  • Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org