Hello,
Joomla v3.3.4, JomSocial v3.1.2.4, T3 Framework v2.3.2
Nginx v1.6.2
Joomla SEF & url rewriting : enable
SH404SEF : Not used, neither other SEF component
We've planned to move from an Apache server to Nginx.
We are testing our configuration on our local server. Nginx server runs fine except for all the JomSocial links. Whatever the JomSocial link used we have 404 error, see below the details from the logs.
Is there any specific JomSocial configuration for Nginx ?
Keep in mind that all the others links work fine (kunena forum, Joomla articles, third search tools, payment app etc.).
Nginx configuration follows the Joomla recommendations, see below details.
127.0.0.1 - - [04/Oct/2014:08:24:41 +0200] "GET /friends/index.php?option=com_community&view=friends&task=ajaxAutocomplete&allfriends=1 HTTP/1.1" 404 537 "http://localhost:82/friends/show-all" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0"
127.0.0.1 - - [04/Oct/2014:08:26:51 +0200] "GET /profile/index.php?option=com_community&view=friends&task=ajaxAutocomplete&allfriends=1 HTTP/1.1" 404 537 "http://localhost:82/profile/edit-profile" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0"
127.0.0.1 - - [04/Oct/2014:08:26:51 +0200] "POST /index.php HTTP/1.1" 200 154 "http://localhost:82/profile/edit-profile" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0"
127.0.0.1 - - [04/Oct/2014:08:27:36 +0200] "GET /recherches/index.php?option=com_community&view=friends&task=ajaxAutocomplete&allfriends=1 HTTP/1.1" 404 537 "http://localhost:82/recherches/advanced-search" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0"
127.0.0.1 - - [04/Oct/2014:08:27:36 +0200] "POST /index.php HTTP/1.1" 200 154 "http://localhost:82/recherches/advanced-search" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0"
Nginx conf:
server {
listen 82 default_server;
server_name localhost;
root /home/lionel/www/jomsocialLive;
index index.php index.htm index.html;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
# serve static files that exist without running other rewrite tests
if (-f $request_filename) {
expires 30d;
break;
}
# send all non-existing file or directory requests to index.php
if (!-e $request_filename) {
rewrite ^/(.*) /index.php last;
}
}
# deny running scripts inside writable directories
location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
return 403;
error_page 403 /403_error.html;
}
location ~* .(jpg|jpeg|png|gif|ico|css|js)$ {
expires 365d;
}
# redirect server error pages to the static page /50x.html
#
error_page 404 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Cheers,
L
Hi.
I passed your request to our developers. I'll update you ASAP.
Hi.
Do you have SSH access so our developer could take a look?
hi,
I can setup an ssh access, will keep you updated when it's ready.
Cheers,
L
hi,
we've setup ssh & web access, see details in our first post
Cheers,
L
Hi.
I can't replicate your issue. Every JomSocial page is perfectly available:
prntscr.com/4tih8g
No 404s...
Hi there
JomSocial does not require any special nginx configuration as long as you have the proper server setup.
Most basic setup of nginx would work.
I have just checked your development site without even using SSH and i can see all of the jomsocial pages opening quite nicely.
Could it be that it is something wrong with your localhost setup?
Hello,
yes you're right concerning the display of the JomSocial pages.
But could you checked the messages displayed at the firebug console:
Each time a JomSocial page is displayed we've got the 404 error.
Do you have an explanation about it ?
Cheers,
L
hello,
in fact you have to check the messages displayed at the firebug console:
Each time a JomSocial page is displayed(search, advancesearch, and so on...) we've got 404 error message.
And of course the same errors in the access.log of the server.
Could you explain it ?
Cheers,
L
Hi.
It seems that internal call of js file ends with 404.I assign developer to this thread.
Hi,
seem the Nginx rewrite not properly work.
the error pages, example this URL /friends/index.php?option=com_community&view=friends&task=ajaxAutocomplete&allfriends=1
that URL must /index.php?option=com_community&view=friends&task=ajaxAutocomplete&allfriends=1.
please try this solutions:
1. add live site value at joomla configuration.php, if not work try step 2
2. try to changing:
try_files $uri $uri/ /index.php?q=$uri&$args;
try_files $uri $uri/ /index.php?q=$request_uri;
Hi,
in fact we've already tested these changes without any effect.
We've cleared caches (server & browser) restarted each time nginx after any change, but issue is still there.
Only on the JomSocial links.
Others apps works fine.
Cheers,
L
Hi,
please check it, I put rewrite rule
rewrite /\w*/index\.php http://yourIP:8083/index.php$1 redirect;
Hi,
thank you, well done, almost solved.
the only issue remaining is the access to the backend site.
http://ip:8083/administrator is redirected to http://ip:8083/index.php
Could you give us your advice for solving this last issue ?
Cheers,
L