Меню Закрыть

Nextcloud: убираем index.php из URL

Послу установки облака url главной страницы со списком файлов пользователя выглядит так: http://nextcloud.com/index.php/apps/files. И все остальные ссылки также включают index.php. Сегодня рассмотрим как его убрать.

Для начала рассмотрим отвечает ли требованиям наш сервер:

  • Должны быть установлены и включены модули mod_env, mod_rewrite
  • .htaccess должен быть доступен для записи для пользовотеля www-data

Если выше облако установлено в подпапке и доступно по адресу вида http://yousite.net/cloud, то в файле config.php нужно добавить следующие строки:

'overwrite.cli.url' => 'https://example.org/nextcloud',
'htaccess.RewriteBase' => '/cloud',

Если облако установлено на отдельной машине, или под него выделен отдельный виртуальный хост, тогда строки должны выглядеть так:

'overwrite.cli.url' => 'https://example.org/',
'htaccess.RewriteBase' => '/',

Завершающим действие будет выполнение следующей команды:

# sudo -u www-data php occ maintenance:update:htaccess

От имен HTTP пользователя запускаем обновления файла .htaccess. Скрипт сам внесет необходимые правки.

28 Comments

  1. Bryanalava

    Hello!

    Do you want to experience the thrill and excitement of cricket betting with the chance to win big? Then we have an excellent offer just for you!

    We offer the best odds on cricket betting in the United Arab Emirates. Whether you’re an experienced bettor or a newcomer to the world of betting, with us, you can enjoy unforgettable experiences and possibly change your life for the better.

    Why Choose Us?
    — High Odds: We offer the most favorable odds that increase your chances of winning big.
    — Wide Selection of Matches: Enjoy betting on the most thrilling cricket matches and tournaments.
    — Safety and Reliability: Your safety and confidentiality are our priority. You can trust the fairness and transparency of all operations.
    — Ease and Convenience: Betting with us is easy and convenient, even if you’ve never done it before. Our platform is intuitive and accessible from any device.
    — Exclusive Bonuses: Receive special offers and bonuses for new and existing customers.
    Try Now!
    Don’t miss the opportunity to experience the real thrill and adrenaline rush of cricket betting! Even if you’ve never bet before, now is the time to try. It’s simple, safe, and could become your new exciting hobby.

    Special Offer for New Customers:
    Register now and receive a bonus on your first deposit! Increase your chances of winning from the very beginning.

    Contact us to learn more and place your first bet. This is your chance to experience new sensations and maybe hit the jackpot!

    Best regards, https://1xbeticricetc1xbetti5.ru/

  2. Timothyten

    МОСКВА, 7 мая — РИА Новости. Правительство России, возглавляемое Михаилом Мишустиным, уйдет в отставку во вторник.
    Сразу после инаугурации президента Владимира Путина нынешний кабинет министров сложит полномочия перед вступившим в должность главой государства.
    Прогон по комментария

  3. KosMuxa

    sudo -u www-data заставляет выполнить команду от имени apache
    опечатка sudo -u www-data PHP occ maintenance:update:htaccess, находяс в директории nextcloud

  4. Алекс

    # sudo -u www-data occ maintenance:update:htaccess
    sudo от рута? Перестраховщик чтоли?

    occ нет такого пакета и команды

    Инструкция нерабочая, выкладывай сразу весь мануал свой по поднятию апача, иначе бессмысленно, т.к. начальные условия могут быть разные.

Добавить комментарий

Ваш адрес email не будет опубликован.


Срок проверки reCAPTCHA истек. Перезагрузите страницу.