?
avatar baijianpeng
baijianpeng
9 Nov 2016

It is very easy to enable SEF of Joomla on Apache server: just click to enable those "options" and then rename the file htaccess.txt to .htaccess, that is all.

However, if we don't user Apache, but use only NginX instead, that will be very very difficult to enable SEF of Joomla. For me, it is extremely difficult, because I never succeeded on that.

Could you please do some coding job to make it easier to enable SEF of Joomla on NginX?

Thank you.

avatar baijianpeng baijianpeng - open - 9 Nov 2016
avatar andrepereiradasilva
andrepereiradasilva - comment - 9 Nov 2016

+1 to this

avatar mbabker
mbabker - comment - 9 Nov 2016

I don't know much about nginx but everything I've ever read gives me the impression that this isn't something that could be done in Joomla. nginx doesn't use the concept of .htaccess that can be set in the web space but requires making changes at the server configuration level, well beyond the scope of what Joomla would typically have access to modify.

The best we can do I think is to just point people to https://docs.joomla.org/Nginx. I know full well it's pretty technical but what else can we do?

avatar andrepereiradasilva
andrepereiradasilva - comment - 9 Nov 2016

i use nginx for 2-3 years now

yes nginx, for performance/security reasons, doesn't have htaccess concept, but we can add the rules in a nginx-joomla.conf (with a clear warning to not point to that file and they should copy that file to a server protected directory ex: /etc/nginx/conf.d/ and them add an include /etc/nginx/conf.d/nginx-joomla.conf; to their server blocks) so people add then to their server blocks (similiar to virtualhosts in apache).

avatar brianteeman
brianteeman - comment - 9 Nov 2016

Thats correct the equivalent location for this would be in the nginx
configuration file which obviously Joomla does not and should not not have
access too.

The bests that we could do wold be to provide a file that is equivalent to
the htaccess,txt in functionality but you would need to manually put an
include in the nginx server configuration file. so you would need to add
something like in your server configuration file

include /home/myuser/www/nginx.conf;

On 9 November 2016 at 14:29, Michael Babker notifications@github.com
wrote:

I don't know much about nginx but everything I've ever read gives me the
impression that this isn't something that could be done in Joomla. nginx
doesn't use the concept of .htaccess that can be set in the web space but
requires making changes at the server configuration level, well beyond the
scope of what Joomla would typically have access to modify.

The best we can do I think is to just point people to
https://docs.joomla.org/Nginx. I know full well it's pretty technical but
what else can we do?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#12848 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8V3Wud4rQBiiiPpdFu0y81KiAnN9ks5q8cq2gaJpZM4Kth3y
.

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
https://brian.teeman.net/ http://brian.teeman.net/

avatar brianteeman
brianteeman - comment - 9 Nov 2016

ah looks like Andre posted at the same time as me

On 9 November 2016 at 14:41, Brian Teeman brian@teeman.net wrote:

Thats correct the equivalent location for this would be in the nginx
configuration file which obviously Joomla does not and should not not have
access too.

The bests that we could do wold be to provide a file that is equivalent to
the htaccess,txt in functionality but you would need to manually put an
include in the nginx server configuration file. so you would need to add
something like in your server configuration file

include /home/myuser/www/nginx.conf;

On 9 November 2016 at 14:29, Michael Babker notifications@github.com
wrote:

I don't know much about nginx but everything I've ever read gives me the
impression that this isn't something that could be done in Joomla. nginx
doesn't use the concept of .htaccess that can be set in the web space but
requires making changes at the server configuration level, well beyond the
scope of what Joomla would typically have access to modify.

The best we can do I think is to just point people to
https://docs.joomla.org/Nginx. I know full well it's pretty technical
but what else can we do?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#12848 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8V3Wud4rQBiiiPpdFu0y81KiAnN9ks5q8cq2gaJpZM4Kth3y
.

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
https://brian.teeman.net/ http://brian.teeman.net/

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
https://brian.teeman.net/ http://brian.teeman.net/

avatar andrepereiradasilva
andrepereiradasilva - comment - 9 Nov 2016

but attention it need to be clear the user should NEVER point to the conf file in joomla directory.
In nginx logic that would be a big security issue!

In a conf file in nginx we can add every server commands nginx allows, so we can do everything (unlike htaccess in apache) so all the conf files need to be in server protected directory outside of the webapp (ex: joomla) reach.

avatar jeckodevelopment
jeckodevelopment - comment - 9 Nov 2016

IMHO we could provide a doc page for this and maybe add a parameter in the Global configuration where to write the URL of the .conf file.

avatar andrepereiradasilva
andrepereiradasilva - comment - 9 Nov 2016

Also we should take in consideration that nginx doesn't have a mod_php or something like apache, so the user need to configure the php interpretator that nginx will proxy the php requests too, normally this is php-fpm (and the php-fpm "pools" need to configured too).

avatar Fedik
Fedik - comment - 9 Nov 2016

I would ask differently, when Ngnix will support Joomla! natively? ?

avatar andrepereiradasilva
andrepereiradasilva - comment - 9 Nov 2016

eheheh ... never lol

avatar brianteeman brianteeman - change - 9 Nov 2016
Priority Critical Low
avatar brianteeman
brianteeman - comment - 9 Nov 2016

Reset priority to our documented standards https://docs.joomla.org/Priority
This is NOT a critical issue


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12848.

avatar andrepereiradasilva
andrepereiradasilva - comment - 9 Nov 2016

not counting on security blocks and many other nginx server configs, that of course, are also needed to be added, i have something like this for joomla:

# PHP FPM pool location (uses a unix socket, could also be a TCP host:port ex: 127.0.0.1:9000)
upstream _joomlaphpfpmpool { server unix:/var/run/php-fpm/domain.tld.sock; }

server {
    # [Main server block config omited for brevity]

    # Proxy all valid PHP requests to PHP FPM
    location ~ [^/]\.php(/|$) {
        # [server php config proxy request to php fpm omited for brevity]

        # Proxy requests to PHP FPM pool
        fastcgi_pass _joomlaphpfpmpool;
    }

    # All other requests. Works for Joomla with/without SEO URL
    # - First try direct file access (static images/js/css for instance)
    # - Second try direct directory access
    # - Fallback to joomla index file for joomla routing processing.
    location / { try_files $uri $uri/ /index.php?$args; }
}
avatar Bakual
Bakual - comment - 9 Nov 2016

but attention it need to be clear the user should NEVER point to the conf file in joomla directory.
In nginx logic that would be a big security issue!

Then please don't ship such a file with Joomla. People will point to it for sure if it is there.
Put it into the doc page and maybe reference it somewhere.

avatar brianteeman brianteeman - change - 10 Nov 2016
Category Router / SEF
avatar PhilETaylor
PhilETaylor - comment - 11 Nov 2016

Just like everyone else has said...

This is already documented here:

https://docs.joomla.org/nginx
https://docs.joomla.org/Enabling_Search_Engine_Friendly_(SEF)_URLs_on_Nginx

nginx doesn't load configuration files at runtime like apache does the .htaccess, or IIS does the web.config file and so any changes require server level access (root linux user) in order to be able to restart the nginx server after config changes.

Therefore this can never be something that gets distributed with Joomla as that would be useless.

If you have failed to configure nginx then maybe you should not be the one managing your server - #justsaying - Server Maintenance requires more than just copy and paste skills.

avatar Bakual Bakual - change - 11 Nov 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-11-11 07:17:22
Closed_By Bakual
avatar Bakual Bakual - close - 11 Nov 2016
avatar Bakual
Bakual - comment - 11 Nov 2016

I'm closing this issue as Joomla already "supports" Nginx and the doc pages already exist.

avatar Bakual Bakual - close - 11 Nov 2016
avatar baijianpeng
baijianpeng - comment - 11 Nov 2016

@PhilETaylor and @Bakual : I had already tried those "official docs", but NEVER succeeded.

Or, those docs are not clear enough to follow?

Can you confirm that those docs REALLY can work?

avatar baijianpeng
baijianpeng - comment - 18 Nov 2016

Ok, today I posted a new topic "When will NginX support Joomla SEF natively and automatically?" on NginX official forum. Will someone want to reply to that topic and support my idea? See:

https://forum.nginx.org/read.php?10,271045

Thank you.

avatar brianteeman
brianteeman - comment - 18 Nov 2016

you already have the answer to that here

On 18 November 2016 at 22:22, baijianpeng notifications@github.com wrote:

Ok, today I posted a new topic "When will NginX support Joomla SEF
natively and automatically?" on NginX official forum. Will someone want to
reply to that topic and support my idea? See:

https://forum.nginx.org/read.php?10,271045

Thank you.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#12848 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8egNW-vGZnCvwgPrAI05nb-_TM_xks5q_iUXgaJpZM4Kth3y
.

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
https://brian.teeman.net/ http://brian.teeman.net/

avatar baijianpeng
baijianpeng - comment - 18 Nov 2016

hi, Brian,

Do you mean the "Joomla official docs about nginx" cited above? Those docs
are TOO DIFFICULT for a common Joomla user, when compared with "enabling
SEF on Apache". Maybe you don't think it is SO DIFFICULT, that because you
are an experienced server Admin, not a common user like me.

So I hope Nginx can also support Joomla SEF in such a easy way: the Joomla
Admin just click on a button labeled "SEF On", then Joomla will have full
SEF running on Nginx. Yes, so easy, so simple, which is NOT true for now.

Thank you.


2016-11-19 6:27 GMT+08:00 Brian Teeman notifications@github.com:

you already have the answer to that here

On 18 November 2016 at 22:22, baijianpeng notifications@github.com
wrote:

Ok, today I posted a new topic "When will NginX support Joomla SEF
natively and automatically?" on NginX official forum. Will someone want
to
reply to that topic and support my idea? See:

https://forum.nginx.org/read.php?10,271045

Thank you.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
issuecomment-261657673>,
or mute the thread
vGZnCvwgPrAI05nb-_TM_xks5q_iUXgaJpZM4Kth3y>
.

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
https://brian.teeman.net/ http://brian.teeman.net/


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#12848 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABMPJ1rr8GB1KCn7eVw8kEwN3fGuhUGbks5q_iZZgaJpZM4Kth3y
.

avatar brianteeman
brianteeman - comment - 18 Nov 2016

No the explanation given was that is the only way it can work and because
it is outside the web space on nginx there is nothing more that can be done
by joomla

avatar baijianpeng
baijianpeng - comment - 19 Nov 2016

Yes, I understood this so I posted on NginX official forum now.

Thank you.

白建鹏

https://www.joomlagate.com/

微信公众号:joomlagate
新浪微博: @joomlagate


2016-11-19 6:55 GMT+08:00 Brian Teeman notifications@github.com:

No the explanation given was that is the only way it can work and because
it is outside the web space on nginx there is nothing more that can be done
by joomla


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#12848 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABMPJ0d45SXmnS5l5t6dw9fDO2WOlmfhks5q_izSgaJpZM4Kth3y
.

avatar Bakual
Bakual - comment - 19 Nov 2016

I'm locking this issue.

avatar Bakual Bakual - locked - 19 Nov 16

Add a Comment

Login with GitHub to post a comment