Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a joomla site being served from an nginx server with the following config

server {

    listen 80;
    server_name heftpathology.com;
    server_name_in_redirect off;

    access_log /var/log/nginx/localhost.access_log ;
    error_log /var/log/nginx/localhost.error_log info;

    root /var/www/vhosts/heftpathology.com/httpdocs;
    index index.php index.html index.htm default.html default.htm;
    # Support Clean (aka Search Engine Friendly) URLs
    location / {
            try_files $uri $uri/ /index.php?$args;
    }

    # 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 ~ \.php$ {
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        #include /etc/nginx/fastcgi.conf;
    }

    # caching of files 
    location ~* \.(ico|pdf|flv)$ {
            expires 1y;
    }

    location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {
            expires 14d;
}

}

As per joomla docs.

However URLs are being served as:

http://heftpathology.com/heftpathology.com/index.php

i.e. With the site name twice in them.

share|improve this question
1  
Check your php scripts. Probably you forgot to add protocol to your links –  Alexey Ten Jul 2 at 10:01
    
Yep what they said ^ or you have a typo in your global config base URL in Joomla. –  zigojacko Jul 2 at 11:35
1  
Silly question but have you enabled SEF within Joomla's control panel? –  bybe Jul 2 at 22:37
    
not a silly question! I was trying to restore from an Akeeba back up, worked fine on a mac server as a test, when moving onto production debian server where issue occurred. Looked in database and config file, SEF is indeed enabled. Ive disabled and now works great, thanks –  webby Jul 3 at 22:46

1 Answer 1

The issue was not related to Nginx setup, instead it was a setting to enable SEF in Joomla's database. Disabling SEF stopped the issue from occurring.

A restore to local OS X server did not show the issue after initial installation, it occurred however after a Debian installation.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.