pydio / pydio-core

Pydio 8 official repository
https://pydio.com
GNU Affero General Public License v3.0
867 stars 289 forks source link

404 when trying to access pydio without "/pydio" in url #1328

Closed DominicMe closed 6 years ago

DominicMe commented 7 years ago

It seems like there is something hard-coded in pydio that does not allow to access pydio without "/pydio" in the url.

Here is the relevant snippet from my apache config:

<VirtualHost *:443>
ServerName test.com
DocumentRoot "/usr/share/webapps/pydio"
Alias "/pydio" "/usr/share/webapps/pydio"
</VirtualHost>

With this code pydio can be accessed from test.com/pydio. If the Alias line is removed one would expect pydio to be accessible on test.com however only the misspelled Oups 404 error message is displayed. Am I missing something here?

P.S. Pydio forums are broken. I tried posting there but both times the thread disappeared without warning not to mention malformed posting UI elements.

c12simple commented 7 years ago

To remove /pydio in the url, please follow steps:

  1. In Pydio Settings >> go to Main Options (Application Core) >> set Server URL : blank

  2. Apache: disable conf pydio.conf a2disconf pydio.conf

  3. Apache: create new pydio.conf in /etc/apache2/sites-available/pydio.conf

    <VirtualHost *:80>
        ServerName domain.name
        DocumentRoot "/usr/share/pydio"
        <Directory "/usr/share/pydio">
            Options FollowSymLinks
            AllowOverride Limit FileInfo
            Require all granted
        </Directory>
    </VirtualHost>
  4. Apache: disable default site

    sudo a2dissite 000-default.conf

  5. Apache: enable pydio.conf

    sudo a2ensite pydio.conf

  6. Apache: edit /usr/share/pydio/.htaccess

    change RewriteBase /pydio to RewriteBase /

  7. Pydio: clear plugins cache

    rm -rf /var/lib/pydio/data/cache/plugins_*

    rm -rf /var/lib/pydio/data/cache/i18/*.ser

  8. Restart apache2

    sudo service apache2 restart

fferraro87 commented 7 years ago

Hi, this solution doesn't works, now if i go to "domain.name" i've error Opss etc etc and if i go to domain.name/pydio i've blank page. do you know why? Thanks

pukkutukkutabu commented 7 years ago

In my Centos 7 installation, there is a file /var/cache/pydio/plugins_toplevel_routes.php. If you look inside, there are paths, for example "/pydio/ocs' => array ( " etc. If everything is done according to the instruction and then remove this file, then it will be generated again with new paths. Or this paths can be changed manually At least need 4 steps:

  1. Pydio Settings >> go to Main Options (Application Core) >> set Server URL to blank or whatever (in mycase /share)
  2. In http conf file (pydio.conf) change Alias /pydio /usr/share/pydio to Alias /share /usr/share/pydio (or your path)
  3. Change /usr/share/pydio/.htaccess RewriteBase /pydio to RewriteBase /share
  4. remove /var/cache/pydio all *.ser files and plugins_toplevel_routes.php (or manually change php file)