Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grav inside Joomla a routing issue #50

Closed
codexpert opened this issue Sep 8, 2014 · 8 comments
Closed

Grav inside Joomla a routing issue #50

codexpert opened this issue Sep 8, 2014 · 8 comments
Labels

Comments

@codexpert
Copy link

Hello guys,

I've created a folder 'docs' inside joomla so the 'docs' can be accessible through 'www.website.com/docs' but when i hit the url it showing Joomla 404 - url not found page.
screen shot 2014-09-08 at 3 36 24 pm

I've tried to add some rules in nginx server block but no luck. Here is the code:

location /docs/ {
                 root /usr/share/nginx/docs;
                index index.php index.html index.htm;
                try_files $uri $uri/ /index.php?$request_uri;
        }

Any workaround?

@mahagr mahagr added the question label Sep 8, 2014
@mahagr
Copy link
Member

mahagr commented Sep 8, 2014

To me it looks like Joomla nginx.conf rules get run instead of yours. I've never played with nginx configuration files, so maybe someone else can figure out why your conf file isn't working.

@w00fz
Copy link
Member

w00fz commented Sep 8, 2014

I also haven't played with nginx that much but one thing that catches my eye from your configuration and error you get, is the try_files. I might be wrong but it looks like you are still referencing Joomla's index.php and never reach the Grav's one.

Maybe it should be something like try_files $uri $uri/ /docs/index.php?$request_uri; ?

@codexpert
Copy link
Author

That doesn't help either :(

I've been playing around with different config but no luck.


Parvez Akther

CEO, ThemeXpert

www.themexpert.com
http://t.signauxtrois.com/link?url=http%3A%2F%2Fwww.themexpert.com%2F&ukey=agxzfnNpZ25hbHNjcnhyGAsSC1VzZXJQcm9maWxlGICAwPPZwcoJDA&k=8322f433-17dd-4f00-a303-f2da5aefe4d2

Twitter -- http://www.themexpert.com/Themexpert
http://t.signauxtrois.com/link?url=http%3A%2F%2Fwww.themexpert.com%2FThemexpert&ukey=agxzfnNpZ25hbHNjcnhyGAsSC1VzZXJQcm9maWxlGICAwPPZwcoJDA&k=06d23dc7-8af1-4d0a-f839-2d21f8ad463b

Facebook -- www.facebook.com/ThemeXpert
http://t.signauxtrois.com/link?url=http%3A%2F%2Fwww.facebook.com%2FThemeXpert&ukey=agxzfnNpZ25hbHNjcnhyGAsSC1VzZXJQcm9maWxlGICAwPPZwcoJDA&k=ae1f1893-17f2-4b38-9b0d-4d7d75f34946

On Mon, Sep 8, 2014 at 11:18 PM, Djamil Legato [email protected]
wrote:

I also haven't played with nginx that much but one thing that catches my
eye from your configuration and error you get, is the try_files. I might
be wrong but it looks like you are still referencing Joomla's index.php
and never reach the Grav's one.

Maybe it should be something like try_files $uri $uri/
/docs/index.php?$request_uri; ?


Reply to this email directly or view it on GitHub
#50 (comment).

@rhukster
Copy link
Member

rhukster commented Sep 8, 2014

Have you thought about trying in Apache first, then using that knowledge to port to Nginx? I think we all stand a better chance of finding a solution that way, just Nginx is not something we commonly use.

@codexpert
Copy link
Author

Ok, I moved docs dir to nginix root and updated the nginx conf. Its working fine now

location /docs {
                try_files $uri $uri/ /docs/index.php?q=$request_uri;
        }

Thanks for help guys! I'll share the real Grav powered site soon :)

@w00fz
Copy link
Member

w00fz commented Sep 8, 2014

Glad it's sorted!

@w00fz w00fz closed this as completed Sep 8, 2014
@rhukster
Copy link
Member

rhukster commented Sep 8, 2014

Awesome, perhaps you would be interested in doing a guest blog post on getgrav.org at some point?

@codexpert
Copy link
Author

Thanks @rhukster . I'd also love to open source my template(nimble) which is forked and customized version of learn.getgrav.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants