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

    I’ve just installed modx 0.9.2.1 over at www.dotbids.com for testing and noticed that as soon as I’m klicking on an link my internal Apache port gets appended to the domain like the following: http://www.dotbids.com:1158/login.html.
    I can’t find a solution for this and talked already to my hostingprovider. He said that this problem solely exists because of either misconfigurated relative or absolute paths or when a script links internal via url’s. Whatever this means??

    A similar but different case can be found here: http://modxcms.com/forums/index.php/topic,1819.15.html
    I tried the suggestions mentioned there but it did not work out for me.

    My installation went flawless and everything else is working. Php runs as module under Apache. My phpinfo.php can be found here: http://www.dotbids.com/phpinfo.php.

    Since I’m a bit helpless with this it would be nice If someone capable can giv me a hint on where to start. Thank you wink
      • 22303 MODX Staff
      • 10,725 Posts
      This sounds like the port number is misconfigured in Apache, to a port other than 80 or 443 (the standard SSL port). Any other ports will be appended to the domain; otherwise, it would not work in those environments. If the server is configured for port 1158, then the URLs need to be directed to port 1158. What am I missing?
        • 18803
        • 6 Posts
        Quote from: OpenGeek at Sep 28, 2006, 09:33 AM

        This sounds like the port number is misconfigured in Apache, to a port other than 80 or 443 (the standard SSL port). Any other ports will be appended to the domain; otherwise, it would not work in those environments. If the server is configured for port 1158, then the URLs need to be directed to port 1158. What am I missing?

        Thanks Jason for jumping in. I thought of this as well but on this hosting I have about 15 domains, each of them pointed in a different subdirectory. For the whole hosting the Apache port is the same: 1158. On some of this domains I have osCommerce, Joomla and SMF Forums installed without any glitch. So if it would be only a bad configuration from Apache, it should appear at the other domains as well insn’t it?
          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: maxxom at Sep 28, 2006, 10:14 AM

          Thanks Jason for jumping in. I thought of this as well but on this hosting I have about 15 domains, each of them pointed in a different subdirectory. For the whole hosting the Apache port is the same: 1158. On some of this domains I have osCommerce, Joomla and SMF Forums installed without any glitch. So if it would be only a bad configuration from Apache, it should appear at the other domains as well insn’t it?
          Only if those other systems use the PHP configuration information to automatically determine the URL. Most likely, they ask you to configure the URL specifically for an installation, so this might explain the issue. You can set the following vars in /manager/includes/config.inc.php before the auto-configuration code that appears there to override this behavior...just make sure you get the paths correct

          <?php
          $base_path= '/full/path/to/modx/root/directory/probably/under/httpdocs/modx/'; //must be full filesystem path
          $base_url= '/modx/'; // would be simply '/' if installed in the document root and not in a subdirectory
          $site_url='http://canonicalname.tld/modx/'; // or whatever the root site_url is
          ?>


          Just add those with the proper values to the top of the config file and you may be able to get around the strange port configuration; though I still don’t understand why you would be accessing Apache on port 80 if it was configured for port 1158?
            • 18803
            • 6 Posts
            Jason, I tried this as you suggested and included:

            $base_path= ’/home/www/dotbids/’;
            $base_url= ’/’;
            $site_url=’http://www.dotbids.com/’;

            after $site_sessionname = "somenumbers";

            but still the same. I can confirm that the first thing I was looking for was the file where the path is getting specified. Since I know it this way from other above mentioned programs. But I havent found any place except /manager/includes/config.inc.php. Things you are saying with port 80 etc. I can’t follow you since I have too less knowledge about configuring Apache. In fact none at all wink I know that any standard request from outside comes through port 80, but that’s all I know.
              • 18803
              • 6 Posts
              Ok, now I noticed something interesting:

              Once the index.php is getting loaded from the database, all the links contain the :1158. Then load again and when the document gets retrieved from the cache, all the links in the sidebar like getting help are okay without the 1158.

              Once you klick on Home you get a multiple choice since I enabled "directory listing not allowed" at my hosting. The server then produces a nonexistant index.html just to avoid that people browse my root directory.

              I’m going to disable that function now to see what happens.
                • 22303 MODX Staff
                • 10,725 Posts
                Yes, you also need to clear your cache, as any pages you visited previously would have cached the links the wrong way.
                  • 18803
                  • 6 Posts
                  Yep, cleared the cache always. But it didn’t help.

                  When you enter the frontpage (Home) all links are appended with the 1158. Once you klick on a link other than Home at the right column, after the page loaded all links are okay. As soon as you go back to Home the links are faulty again. I also don’t know why he cant find an index.html when klicking on Home or the dotbids.com headline. .htaccess is properly set up. I think otherwise the other links would not work as well?
                    • 18803
                    • 6 Posts
                    Yeah, have it! It has to do with the suffix .html from user friendly url’s. Once I disable that feature (nothing gets appended to the filename) everything works fine.

                    It seems that there is something wrong with the provided ht.access. The only rule in there is:

                    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

                    Should there be an other rule when one enables .html as a suffix with user friendly url’s?

                    EDIT:

                    Now I added "RewriteBase /" to my .htaccess and it works now with suffix .html enabled! Almost! Every link is fine now except when you click at "Home" or the headline "dotbids.com" at the top, the index.html doesnt get found. It seems that the FURL feature works for every path and filename except the index.php. This one isn’t getting rewritten to index.html like it should.

                    Any ideas anyone? Please? wink