title: Trouble with Parsoid and Visual Editor for Mediawiki
body: <ul>
  <li>Mediawiki Version <strong>1.27</strong> </li>
  <li>Visual Editor Version <strong>1.27</strong> </li>
  <li>Parsoid Version <strong>latest in repository</strong></li>
  </ul>
  
  <p>So I have several web servers running on an Ubuntu VM. The hostname is "atocha". I have Apache running on port 8000. Under this I have a Mediawiki instance. The mediawiki instance is not private.  </p>
  
  <p>I installed Parsoid and it is running on port 8142.</p>
  
  <p>I can access my mediawiki instance by going do "<a href="http://atocha:8000/mediawiki/index.php" rel="nofollow noreferrer">http://atocha:8000/mediawiki/index.php</a>"</p>
  
  <p>I can curl the Mediawiki api just fine. "<a href="http://atocha:8000/mediawiki/api.php" rel="nofollow noreferrer">http://atocha:8000/mediawiki/api.php</a>"</p>
  
  <p>However when I try to edit the pages using Visual Editor I receive the following error <strong>"Error loading from server: 404: docserver-http: HTTP 404. Would you like to retry?"</strong> that pops up in a display. No error is thrown in Apache.</p>
  
  <p>Here is my parsoid local settings.js file</p>
  
  <pre><code>'use strict';
  
  exports.setup = function(parsoidConfig) {
      parsoidConfig.setMwApi({ 
          uri: 'http://atocha:8000/mediawiki/api.php', 
          domain: 'atocha',
          prefix: 'atocha'
      });
      parsoidConfig.useSelser = true;
  };
  </code></pre>
  
  <p>Here is the pertinent LocalSettings.php section:</p>
  
  <pre><code>wfLoadExtension( 'VisualEditor');
  // Enable by default for everybody
  $wgDefaultUserOptions['visualeditor-enable'] = 1;
  // Don't allow users to disable it
  $wgHiddenPrefs[] = 'visualeditor-enable';
  
  $wgVirtualRestConfig['modules']['parsoid'] = array(
          // URL to the Parsoid instance
          // Use port 8142 if you use the Debian package
          'url' =&gt; 'http://127.0.0.1:8142'
  );
  </code></pre>
  
  <p>If I try to use parsoid like this in a browser:</p>
  
  <pre><code>http://atocha:8142/localhost/v3/page/Javadoc_Basics
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>Did not find page revisions for V3/page/Javadoc_Basics
  </code></pre>
  
  <p>If I try parsoid like this however:</p>
  
  <pre><code>http://atocha:8142/localhost:8000/v3/page/Javadoc_Basics
  </code></pre>
  
  <p>I get this:</p>
  
  <pre><code>Cannot GET /atocha:8000/v3/page/Javadoc_Basics
  </code></pre>
  
  <p>Anyone have an idea about what's going on? Thanks in advance.</p>