Monica: Want To Install In Sub Directory 馃搧

Created on 8 Jun 2017  路  14Comments  路  Source: monicahq/monica

I Want to install Monica in SubDirectory

Hi,
I Want to install Monica in SubDirectory ie. https://localhost/monica/ instead of https://localhost/
i tried but getting 404 error of assets

i am trying to install public folder in sub directory of web root

  • private

    • CHANGELOG

    • CONTRIBUTING.md

    • LICENSE

    • Procfile

    • app

    • artisan

    • bootstrap

    • bower.json

    • composer.json

    • composer.lock

    • config

    • database

    • .........

  • htdocs

    • subdir

    • build

    • css

    • favicon.ico

    • fonts

    • img

    • index.php

    • js

    • robots.txt

    • web.config

    • storage

please mention version also it helps to keep up to date

packaging

Most helpful comment

@peperunas I'll try to get around to it at some point. I have a few appointments today, but may have some time when I get back!

All 14 comments

I am trying to do the same thing. I can't log in, either - trying to log into https://server/monica/server.php tries to redirect me to /login instead of /monica/login, which gets me a 404.

This is because none of the URLs change when the APP_URL is changed. This would require an update of all links to use asset or url helper functions, or named routes.

If I have time today I might submit a pull request with updated links!

I suggest as workaround to use virtual hosts

Yep @BranTurner that would be great.

@peperunas I'll try to get around to it at some point. I have a few appointments today, but may have some time when I get back!

@BranTurner, that's great to hear. Kudos to you!

Hi - same issue for me...

I can't use https://domain.com/monica/server.php though perhaps I am doing something wrong? I'm assuming I should go for server.php as otherwise I just get a directory listing...

Have set APP_URL=https://domain.com/monica/ in .env

@adriangibbons You should serve the index.php file in the public directory as the access point to Laravel applications. I don't believe that Monica will support subdirectories at present, so this is something that needs to be fixed - I aim to get around to it at some point!

need to change all *.blade.php all file of resources/views

<img class="logo" src="/img/small-logo.png" alt="">

to

<img class="logo" src="{{ url(/img/small-logo.png) }}" alt="">

and

<form class="" action="/login" method="post">

to

<form class="" action="{{ url(/login) }}" method="post">

somewhat worked but still getting error

just installed monica on my yunohost in the root. If this get's fixed, will I be able to move the installation to a subdirectory? Or will I have to reinstall?

@BranTurner Any Update ?

@GaneshKandu after some test, I confirm to you it's working well!

Thanks @asbiin !

working now but Getting Error wile exporting sql
installed with table prefix
Base table or view not found: 1146 Table 'premc_premc_information_schema.tables' doesn't exist

Any updates? Highly desired feature.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TheGP picture TheGP  路  3Comments

jkbecker picture jkbecker  路  3Comments

xorgnz picture xorgnz  路  3Comments

badry-abderrahmane picture badry-abderrahmane  路  3Comments

vesper8 picture vesper8  路  4Comments