Joomla 4.0 sef with nginx

115 views
Skip to first unread message

Christoforos Korifidis

unread,
Jan 24, 2019, 11:20:06 AM1/24/19
to Joomla! CMS Development
Hello I have joomla 4.0 apha 6 with sef url rewrite enabled.
I am using nginx wiht the configuration from https://docs.joomla.org/Nginx
I have enabled the greek language as the default and the only language on my site.
Because of this my urls have the following form:


The above url and all other similar work fine, but when I am accessing the root of the site aka http://domain.ltd or http://domain.ltd/ i get the default page from the server. The urls working only under the path http://domain.ltd/el for example http://domain.ltd/elhttp://domain.ltd/el/sompage works fine.
Shouldn't Joomla redirect me to http://domain.ltd/el path once the el language is the defautl on the site?

My nginx configuration:



server {
   listen 80 ;
   server_tokens off;
   client_max_body_size 20M;
   


    server_name dev.businessnews.gr
    server_name_in_redirect off;
    access_log /home/business/www/business.access.log;
    error_log /home/business/www/business.error.log info;
    root /home/business/www;
    index index.php;

    # SEF Urls
    location / {
        try_files $uri $uri/ /index.php?$args;
    }
   
    #deny running scripts inside writeable directories
    location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|jsp|asp|sh|cgi)$ {
        return 403;
        error_page 403 /403_error.html;
    }

    location ~ \.php$ {
    fastcgi_pass unix:/run/php/php7.2-fpm.sock;
    fastcgi_index index.php;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include /etc/nginx/fastcgi.conf;
    }
  
}

any help is appreciated

Flowman

unread,
Apr 3, 2019, 11:09:21 AM4/3/19
to Joomla! CMS Development
You can steal my nginx conf.


It is made for a docker container but you get the point.

Cheers

Peter

jms

unread,
Apr 3, 2019, 11:32:22 AM4/3/19
to joomla-...@googlegroups.com
If the Greek Language is default and the only one for the site, it means the site is monolingual.
In that case, one has to disable the System Language filter plugin.
When done the prefix ‘el' will not be added in the url.
Hope it helps

JM
> --
> You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-cm...@googlegroups.com.
> To post to this group, send email to joomla-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/joomla-dev-cms.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages