MU Soapbox

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Muxify
    • Mustard

    DigitalOcean Mediawiki ShortURL

    Mildly Constructive
    4
    25
    2189
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • I
      ixokai @Bobotron last edited by

      @bobotron Try that again with "ls -la" instead of just "ls"

      Bobotron 1 Reply Last reply Reply Quote 0
      • Bobotron
        Bobotron @ixokai last edited by

        @ixokai

        -rw-r--r--. 1 elmerg elmerg 1623 Dec 8 2017 /var/www/v5game/public_html/mw/index.php

        I 1 Reply Last reply Reply Quote 0
        • I
          ixokai @Bobotron last edited by

          @bobotron said in DigitalOcean Mediawiki ShortURL:

          @ixokai

          -rw-r--r--. 1 elmerg elmerg 1623 Dec 8 2017 /var/www/v5game/public_html/mw/index.php

          I was wondering if this is a permissions issue; on my wiki's apache (or www or whatever) usually owns the mediawiki installation. You see "elmerg elmerg"? That's the user and group that owns the directory. Its permissions are set to user = read/write, group=read, everyone else=read.

          Which should be enough for apache to read and execute php as php from a browser isn't executed according to the +x permission.

          My last shot in the dark is:

          Do:

          ls -la /var/www

          To see who owns that, and:

          sudo chown -R <user>:<group> /var/www/v5game

          But I don't think it'll fix it. I have no idea what's going on 😞

          You might try digging around for the access and error logs in apache, unfortunately I don't know where they are in red hat os's.

          Bobotron 1 Reply Last reply Reply Quote 0
          • Bobotron
            Bobotron @ixokai last edited by

            @ixokai said in DigitalOcean Mediawiki ShortURL:

            ls -la /var/www

            Looks like root covers the directories except for the ones I created for some sites, which I set permissions for to my non-root sudo user per DigitalOcean's setup for virtual hosts.

            1 Reply Last reply Reply Quote 0
            • Bobotron
              Bobotron last edited by Bobotron

              WISE FWOM YOUW GWAVE!

              I finally got this, so I figured I'd share it here.

              First I went through httpd.conf and changed every instance of AllowOverride to All

              Then I did this...

              getenforce
              setenforce 0
              sudo systemctl restart httpd.service

              I added the below under DocumentRoot in my virtual host config in sites-available:

              <Directory />
              Options FollowSymLinks
              AllowOverride None
              </Directory>
              <Directory /var/www/YOURDOMAIN.COM/public_html>
              Options Indexes FollowSymLinks MultiViews
              AllowOverride All
              Order allow,deny
              allow from all
              </Directory>

              I rebooted the httpd.service again using the systemctl above.

              Then I did my .htaccess in my public_html folder, and used this.
              RewriteEngine On
              RewriteBase /
              RewriteCond %{REQUEST_FILENAME} !-f
              RewriteCond %{REQUEST_FILENAME} !-d
              RewriteRule ^wiki/(.)$ mw/index.php?title=$1 [PT,L,QSA]
              RewriteRule ^wiki/
              $ mw/index.php [L,QSA]
              RewriteRule ^wiki$ mw/index.php [L,QSA]

              In LocalSettings.php, I added these under wgscriptpath:

              $wgArticlePath = "/wiki/$1";
              $wgUsePathInfo= true;

              It worked perfectly to redirect /mw/ to /wiki/.

              I also used another setting to make the core .com redirect in the .htaccess as well, just putting this under the info above..

              RewriteEngine on
              RewriteCond %{HTTP_HOST} domain\.com [NC]
              RewriteCond %{REQUEST_URI} ^/$
              RewriteRule ^(.*)$ /mw/$1 [L]

              It's working perfectly now.

              1 Reply Last reply Reply Quote 2
              • 1
              • 2
              • 2 / 2
              • First post
                Last post